mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-21 04:40:03 +02:00
LCL: call TDockManager.ResetBounds in TWinControl.AlignControls for Delphi compatibility
git-svn-id: trunk@24829 -
This commit is contained in:
parent
b06278020c
commit
c4c7983818
@ -9081,7 +9081,7 @@ Reads message from flag area, or stores a message
|
|||||||
</element>
|
</element>
|
||||||
<!-- variable Visibility: private -->
|
<!-- variable Visibility: private -->
|
||||||
<element name="TWinControl.FUseDockManager">
|
<element name="TWinControl.FUseDockManager">
|
||||||
<short/>
|
<short>Create DockManager</short>
|
||||||
<descr/>
|
<descr/>
|
||||||
<seealso/>
|
<seealso/>
|
||||||
</element>
|
</element>
|
||||||
@ -11170,6 +11170,7 @@ End;
|
|||||||
<!-- property Visibility: public -->
|
<!-- property Visibility: public -->
|
||||||
<element name="TWinControl.DockSite">
|
<element name="TWinControl.DockSite">
|
||||||
<short>Is this a dock site? (read/write, default is False)</short>
|
<short>Is this a dock site? (read/write, default is False)</short>
|
||||||
|
<descr>Enable this to use the DockManager automatically. For example to call DockManager.ResetBounds when the control resizes.</descr>
|
||||||
</element>
|
</element>
|
||||||
<!-- property Visibility: public -->
|
<!-- property Visibility: public -->
|
||||||
<element name="TWinControl.DoubleBuffered">
|
<element name="TWinControl.DoubleBuffered">
|
||||||
@ -11300,7 +11301,8 @@ End;
|
|||||||
</element>
|
</element>
|
||||||
<!-- property Visibility: public -->
|
<!-- property Visibility: public -->
|
||||||
<element name="TWinControl.UseDockManager">
|
<element name="TWinControl.UseDockManager">
|
||||||
<short>[!]Use an dock manager for control docking? (read/write)</short>
|
<short>Create DockManager for docking (read/write)</short>
|
||||||
|
<descr>The DockManager is created via a call to CreateDockManager.</descr>
|
||||||
</element>
|
</element>
|
||||||
<!-- property Visibility: public -->
|
<!-- property Visibility: public -->
|
||||||
<element name="TWinControl.VisibleDockClientCount">
|
<element name="TWinControl.VisibleDockClientCount">
|
||||||
|
@ -1732,7 +1732,6 @@ type
|
|||||||
function DoAlignChildControls(TheAlign: TAlign; AControl: TControl;
|
function DoAlignChildControls(TheAlign: TAlign; AControl: TControl;
|
||||||
AControlList: TFPList; var ARect: TRect): Boolean; virtual;
|
AControlList: TFPList; var ARect: TRect): Boolean; virtual;
|
||||||
procedure DoChildSizingChange(Sender: TObject); virtual;
|
procedure DoChildSizingChange(Sender: TObject); virtual;
|
||||||
procedure DoOnChangeBounds; override;
|
|
||||||
{$IFDEF OldAutoSize}
|
{$IFDEF OldAutoSize}
|
||||||
procedure ResizeDelayedAutoSizeChildren; virtual;
|
procedure ResizeDelayedAutoSizeChildren; virtual;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
@ -3079,6 +3079,9 @@ begin
|
|||||||
//DebugLn('[TWinControl.AlignControls] ',Name,':',Classname,' ',Left,',',Top,',',Width,',',Height,' AlignWork=',NeedAlignWork,' ControlCount=',ControlCount);
|
//DebugLn('[TWinControl.AlignControls] ',Name,':',Classname,' ',Left,',',Top,',',Width,',',Height,' AlignWork=',NeedAlignWork,' ControlCount=',ControlCount);
|
||||||
//if AControl<>nil then DebugLn(' AControl=',AControl.Name,':',AControl.ClassName);
|
//if AControl<>nil then DebugLn(' AControl=',AControl.Name,':',AControl.ClassName);
|
||||||
//end;
|
//end;
|
||||||
|
// first let the DockManager align controls
|
||||||
|
if DockSite and UseDockManager and (DockManager<>nil) then
|
||||||
|
DockManager.ResetBounds(false);
|
||||||
if NeedAlignWork then
|
if NeedAlignWork then
|
||||||
begin
|
begin
|
||||||
AdjustClientRect(RemainingClientRect);
|
AdjustClientRect(RemainingClientRect);
|
||||||
@ -3172,13 +3175,6 @@ begin
|
|||||||
ReAlign;
|
ReAlign;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TWinControl.DoOnChangeBounds;
|
|
||||||
begin
|
|
||||||
inherited DoOnChangeBounds;
|
|
||||||
if FUseDockManager and (DockManager<>nil) then
|
|
||||||
DockManager.ResetBounds(false);
|
|
||||||
end;
|
|
||||||
|
|
||||||
{$IFDEF OldAutoSize}
|
{$IFDEF OldAutoSize}
|
||||||
procedure TWinControl.ResizeDelayedAutoSizeChildren;
|
procedure TWinControl.ResizeDelayedAutoSizeChildren;
|
||||||
var
|
var
|
||||||
@ -8052,9 +8048,11 @@ begin
|
|||||||
' -> NewBounds=',dbgs(NewBounds));
|
' -> NewBounds=',dbgs(NewBounds));
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
{$IFDEF VerboseBug16184}
|
{$IFDEF VerboseBug16184}
|
||||||
|
if (Parent=nil) and (Visible) then begin
|
||||||
DebugLn('[TWinControl.DoSendBoundsToInterface] A ',DbgSName(Self),
|
DebugLn('[TWinControl.DoSendBoundsToInterface] A ',DbgSName(Self),
|
||||||
' OldRelBounds=',dbgs(FBoundsRealized),
|
' OldRelBounds=',dbgs(FBoundsRealized),
|
||||||
' -> NewBounds=',dbgs(NewBounds));
|
' -> NewBounds=',dbgs(NewBounds));
|
||||||
|
end;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
FBoundsRealized:=NewBounds;
|
FBoundsRealized:=NewBounds;
|
||||||
Include(FWinControlFlags,wcfBoundsRealized); // Note: set before calling widgetset, because used in WMSize
|
Include(FWinControlFlags,wcfBoundsRealized); // Note: set before calling widgetset, because used in WMSize
|
||||||
|
Loading…
Reference in New Issue
Block a user