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:
vincents 2010-12-10 20:16:16 +00:00
parent fdaaeb6f3f
commit f181c9db90
2 changed files with 2 additions and 5 deletions

View File

@ -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;

View File

@ -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);