mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-26 05:39:58 +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;
|
procedure TCustomForm.DoAutoAdjustLayout(const AMode: TLayoutAdjustmentPolicy;
|
||||||
const AXProportion, AYProportion: Double);
|
const AXProportion, AYProportion: Double);
|
||||||
var
|
var
|
||||||
NewWidth, NewHeight, OldWidth, OldHeight: Integer;
|
NewWidth, NewHeight: Integer;
|
||||||
begin
|
begin
|
||||||
if Assigned(Parent) then
|
if Assigned(Parent) then
|
||||||
begin
|
begin
|
||||||
@ -1584,10 +1584,13 @@ begin
|
|||||||
if not ParentFont or (Parent=nil) then
|
if not ParentFont or (Parent=nil) then
|
||||||
ScaleFontsPPI(AYProportion);
|
ScaleFontsPPI(AYProportion);
|
||||||
|
|
||||||
|
NewWidth := Round(Width*AXProportion);
|
||||||
|
NewHeight := Round(Height*AYProportion);
|
||||||
|
|
||||||
BorderSpacing.AutoAdjustLayout(AXProportion, AYProportion);
|
BorderSpacing.AutoAdjustLayout(AXProportion, AYProportion);
|
||||||
Constraints.AutoAdjustLayout(AXProportion, AYProportion);
|
Constraints.AutoAdjustLayout(AXProportion, AYProportion);
|
||||||
|
|
||||||
SetBounds(Left, Top, Round(Width*AXProportion), Round(Height*AYProportion));
|
SetBounds(Left, Top, NewWidth, NewHeight);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user