lcl: DoAutoAdjustLayout: scale Font.Size if specified.

git-svn-id: trunk@53688 -
This commit is contained in:
ondrej 2016-12-15 08:19:36 +00:00
parent 9ec0b84232
commit f315aaac55

View File

@ -2950,11 +2950,15 @@ procedure TControl.DoAutoAdjustLayout(const AMode: TLayoutAdjustmentPolicy;
const AXProportion, AYProportion: Double; const AScale0Fonts: Boolean);
var
AAWidth, AAHeight: Boolean;
NewLeft, NewTop, NewWidth, NewHeight, OldWidth, OldHeight: Integer;
NewRight, NewBottom: Int64;
NewLeft, NewTop, NewWidth, NewHeight, NewRight, NewBottom, OldWidth, OldHeight: Integer;
begin
if (AScale0Fonts or (Font.Height<>0)) and (not ParentFont or (Parent=nil)) then
Font.Height := Round(GetFontData(Font.Reference.Handle).Height*AYProportion);
begin
if Font.Size<>0 then
Font.Size := Round(Font.Size*AYProportion)
else
Font.Height := Round(GetFontData(Font.Reference.Handle).Height*AYProportion);
end;
// Apply the changes
if AMode in [lapAutoAdjustWithoutHorizontalScrolling, lapAutoAdjustForDPI] then