lcl: store loaded height and width to use to float control for the first time

git-svn-id: trunk@20366 -
This commit is contained in:
paul 2009-06-03 06:26:23 +00:00
parent 72c3e1a908
commit e24d4d50d0

View File

@ -586,7 +586,7 @@ end;
function TControl.GetUndockHeight: Integer;
begin
if FUndockHeight>0 then
if FUndockHeight > 0 then
Result := FUndockHeight
else
Result := Height;
@ -594,7 +594,7 @@ end;
function TControl.GetUndockWidth: Integer;
begin
if FUndockWidth>0 then
if FUndockWidth > 0 then
Result := FUndockWidth
else
Result := Width;
@ -2801,6 +2801,9 @@ begin
// autosize this control
if cfAutoSizeNeeded in FControlFlags then
AdjustSize;
// store designed width and height for undocking
FUndockHeight := Height;
FUndockWidth := Width;
if Action <> nil then ActionChange(Action, True);
CheckOnChangeBounds;