fix gtk autosize loop

git-svn-id: trunk@18574 -
This commit is contained in:
paul 2009-02-05 02:55:49 +00:00
parent 702dc11c4c
commit 80e3207944
3 changed files with 5 additions and 4 deletions

View File

@ -1795,7 +1795,7 @@ type
AllowDisabled, AllowWinControls: Boolean): TControl; AllowDisabled, AllowWinControls: Boolean): TControl;
function ControlAtPos(const Pos: TPoint; Flags: TControlAtPosFlags): TControl; function ControlAtPos(const Pos: TPoint; Flags: TControlAtPosFlags): TControl;
function ContainsControl(Control: TControl): Boolean; function ContainsControl(Control: TControl): Boolean;
procedure DoAdjustClientRectChange; procedure DoAdjustClientRectChange(const InvalidateRect: Boolean = True);
procedure InvalidateClientRectCache(WithChildControls: boolean); procedure InvalidateClientRectCache(WithChildControls: boolean);
function ClientRectNeedsInterfaceUpdate: boolean; function ClientRectNeedsInterfaceUpdate: boolean;
procedure SetBounds(aLeft, aTop, aWidth, aHeight: integer); override; procedure SetBounds(aLeft, aTop, aWidth, aHeight: integer); override;

View File

@ -3311,10 +3311,11 @@ end;
Asks the interface if clientrect has changed since last AlignControl Asks the interface if clientrect has changed since last AlignControl
and calls AlignControl(nil) on change. and calls AlignControl(nil) on change.
-------------------------------------------------------------------------------} -------------------------------------------------------------------------------}
procedure TWinControl.DoAdjustClientRectChange; procedure TWinControl.DoAdjustClientRectChange(const InvalidateRect: Boolean = True);
var var
R: TRect; R: TRect;
begin begin
if InvalidateRect then
InvalidateClientRectCache(True); InvalidateClientRectCache(True);
R := GetClientRect; R := GetClientRect;
AdjustClientRect(R); AdjustClientRect(R);

View File

@ -6759,7 +6759,7 @@ begin
FFixWidgetsResized.Remove(FixWidget); FFixWidgetsResized.Remove(FixWidget);
MainWidget:=GetMainWidget(FixWidget); MainWidget:=GetMainWidget(FixWidget);
LCLControl:=TWinControl(GetLCLObject(MainWidget)); LCLControl:=TWinControl(GetLCLObject(MainWidget));
LCLControl.DoAdjustClientRectChange; LCLControl.DoAdjustClientRectChange(False);
end else begin end else begin
break; break;
end; end;