LCL: ChildSizing, fix applying new Height. Issue #24986

This commit is contained in:
Martin 2024-03-24 16:00:18 +01:00
parent da3a1abb9a
commit 560c6818f9

View File

@ -2286,7 +2286,7 @@ begin
then
NewWidth:=CellBounds.Right-CellBounds.Left;
end;
if (NewHeight<ColBox.PreferredSize[asboVertical]) then begin
if (NewHeight<RowBox.PreferredSize[asboVertical]) then begin
// column is bigger than preferred height of the control
case CurControl.BorderSpacing.CellAlignVertical of
ccaFill: NewHeight:=CellBounds.Bottom-CellBounds.Top;
@ -2295,7 +2295,7 @@ begin
ccaCenter: NewBounds.Top:=NewBounds.Top
+(CellBounds.Bottom-CellBounds.Top-NewHeight) div 2;
end;
end else if (NewHeight>ColBox.PreferredSize[asboVertical]) then begin
end else if (NewHeight>RowBox.PreferredSize[asboVertical]) then begin
// column is smaller than preferred height of the control
if ChildSizing.ShrinkVertical
in [crsScaleChilds,crsHomogenousChildResize,crsSameSize]