mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-28 21:00:43 +02:00
lcl: DoAutoAdjustLayout: scale Font.Size if specified.
git-svn-id: trunk@53688 -
This commit is contained in:
parent
9ec0b84232
commit
f315aaac55
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user