From 60ab9873f32e3e1d315d77bf3c55b6eb4869b224 Mon Sep 17 00:00:00 2001 From: mattias Date: Mon, 5 Jul 2010 07:47:20 +0000 Subject: [PATCH] LCL: TControl.GetDefaultWidth/Height: base bounds are independent of autosize git-svn-id: trunk@26468 - --- lcl/include/control.inc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lcl/include/control.inc b/lcl/include/control.inc index 1a6fce12f3..1ca0021797 100644 --- a/lcl/include/control.inc +++ b/lcl/include/control.inc @@ -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