mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-24 14:39:24 +02:00
LCL: form: fix AutoAdjustLayout if constraints are used. Issue #31336
git-svn-id: trunk@54353 -
This commit is contained in:
parent
13e7653139
commit
4ba349fd6e
@ -1570,7 +1570,7 @@ end;
|
||||
procedure TCustomForm.DoAutoAdjustLayout(const AMode: TLayoutAdjustmentPolicy;
|
||||
const AXProportion, AYProportion: Double);
|
||||
var
|
||||
NewWidth, NewHeight, OldWidth, OldHeight: Integer;
|
||||
NewWidth, NewHeight: Integer;
|
||||
begin
|
||||
if Assigned(Parent) then
|
||||
begin
|
||||
@ -1584,10 +1584,13 @@ begin
|
||||
if not ParentFont or (Parent=nil) then
|
||||
ScaleFontsPPI(AYProportion);
|
||||
|
||||
NewWidth := Round(Width*AXProportion);
|
||||
NewHeight := Round(Height*AYProportion);
|
||||
|
||||
BorderSpacing.AutoAdjustLayout(AXProportion, AYProportion);
|
||||
Constraints.AutoAdjustLayout(AXProportion, AYProportion);
|
||||
|
||||
SetBounds(Left, Top, Round(Width*AXProportion), Round(Height*AYProportion));
|
||||
SetBounds(Left, Top, NewWidth, NewHeight);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user