LCL: computing preferred clientrect: fixed to use Child.GetControlClassDefaultSize instead of 1

git-svn-id: trunk@26450 -
This commit is contained in:
mattias 2010-07-04 04:50:57 +00:00
parent e5ff98cb75
commit cfda21de52

View File

@ -1038,7 +1038,7 @@ procedure TAutoSizeCtrlData.ComputePreferredClientArea(
or ((CurPreferredWidth=0) and (csAutoSize0x0 in Child.ControlStyle)) then
NewWidth:=CurPreferredWidth
else
NewWidth:=1;
NewWidth:=Max(1,Child.GetControlClassDefaultSize.cx);
NewWidth:=Child.Constraints.MinMaxWidth(NewWidth);
if UseCurrentHeight then
@ -1047,7 +1047,7 @@ procedure TAutoSizeCtrlData.ComputePreferredClientArea(
or ((CurPreferredHeight=0) and (csAutoSize0x0 in Child.ControlStyle)) then
NewHeight:=CurPreferredHeight
else
NewHeight:=1;
NewHeight:=Max(1,Child.GetControlClassDefaultSize.cy);
NewHeight:=Child.Constraints.MinMaxHeight(NewHeight);
end else begin
NewWidth:=0;