mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-19 14:29:29 +02:00
lcl: don't use DT_INTERNAL, the LCL already has selected a system font into the canvas; it prevents mismatches in sizes, if we cannot determine what exact font is used by DT_INTERNAL, fixes issue #16408
git-svn-id: trunk@28672 -
This commit is contained in:
parent
fdaaeb6f3f
commit
f181c9db90
@ -1162,10 +1162,7 @@ begin
|
||||
SaveState;
|
||||
|
||||
if Style.SystemFont then
|
||||
begin
|
||||
Options := Options or DT_INTERNAL;
|
||||
SelectObject(DC, OnGetSystemFont());
|
||||
end;
|
||||
|
||||
// calculate text rectangle
|
||||
fRect := ARect;
|
||||
|
@ -235,7 +235,7 @@ begin
|
||||
TextBox := Rect(0, 0, Screen.Width div 2, Screen.Height - 100);
|
||||
SelectObject(Canvas.Handle, Screen.SystemFont.Reference.Handle);
|
||||
DrawText(Canvas.Handle, PChar(MSG), Length(MSG),
|
||||
TextBox, DT_WORDBREAK or DT_INTERNAL or DT_CALCRECT);
|
||||
TextBox, DT_WORDBREAK or DT_CALCRECT);
|
||||
|
||||
// calculate the width we need to display the buttons
|
||||
MinBtnWidth:=Max(25,MinimumDialogButtonWidth);
|
||||
@ -606,7 +606,7 @@ begin
|
||||
if MessageTxt = '' then
|
||||
MessageTxt := ' ';
|
||||
TextBox := Rect(0, 0, Screen.Width div 2, Screen.Height - 100);
|
||||
Flags := DT_CalcRect or DT_INTERNAL or DT_WordBreak;
|
||||
Flags := DT_CalcRect or DT_WordBreak;
|
||||
SelectObject(Canvas.Handle, Screen.SystemFont.Reference.Handle);
|
||||
DrawText(Canvas.Handle, PChar(MessageTxt), Length(MessageTxt), TextBox, Flags);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user