LCL: TControl.GetDefaultWidth/Height: base bounds are independent of autosize

git-svn-id: trunk@26468 -
This commit is contained in:
mattias 2010-07-05 07:47:20 +00:00
parent f9840ae34a
commit 60ab9873f3

View File

@ -4612,7 +4612,8 @@ end;
------------------------------------------------------------------------------}
function TControl.GetDefaultWidth: integer;
begin
if AutoSize or WidthIsAnchored then
if WidthIsAnchored then
// if width is anchored the read and base bounds were changed at designtime
Result := GetControlClassDefaultSize.cx
else if cfBaseBoundsValid in FControlFlags then
Result := FBaseBounds.Right - FBaseBounds.Left
@ -4631,7 +4632,8 @@ end;
------------------------------------------------------------------------------}
function TControl.GetDefaultHeight: integer;
begin
if AutoSize or HeightIsAnchored then
if HeightIsAnchored then
// if height is anchored the read and base bounds were changed at designtime
Result := GetControlClassDefaultSize.cy
else if cfBaseBoundsValid in FControlFlags then
Result := BaseBounds.Bottom - BaseBounds.Top