mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-05 15:58:15 +02:00
LCL: call DockManager.ResetBounds on every change bounds
git-svn-id: trunk@24763 -
This commit is contained in:
parent
e10e89337c
commit
d55f679aeb
@ -62,11 +62,7 @@
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)\"/>
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
<LCLWidgetType Value="win32"/>
|
||||
</SearchPaths>
|
||||
<CodeGeneration>
|
||||
<TargetOS Value="Win32"/>
|
||||
</CodeGeneration>
|
||||
<Other>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
|
@ -1067,11 +1067,13 @@ procedure TEasyTree.ResetBounds(Force: Boolean);
|
||||
var
|
||||
rNew: TRect;
|
||||
begin
|
||||
DebugLn(['TEasyTree.ResetBounds ']);
|
||||
//drop site resized - never called in Lazarus???
|
||||
if (csLoading in FDockSite.ComponentState) then
|
||||
exit; //not the right time to do anything
|
||||
//how to determine old bounds?
|
||||
rNew := FDockSite.ClientRect;
|
||||
DebugLn(['TEasyTree.ResetBounds ',dbgs(rNew)]);
|
||||
//try catch bad calls (Win32)?????
|
||||
if (rNew.Right <= 0) or (rNew.Bottom <= 0) then
|
||||
exit;
|
||||
|
@ -232,7 +232,7 @@ begin
|
||||
AForm.EnableAlign;
|
||||
end;
|
||||
|
||||
//function TDockMaster.CreateDockable(const AName: string; site: TWinControl;
|
||||
//function TDockMaster.CreateDockable(const AName: string; site: TWinControl);
|
||||
function TDockMaster.CreateDockable(const AName: string;
|
||||
fMultiInst, DisableUpdate: boolean; fWrap: boolean): TWinControl;
|
||||
var
|
||||
|
@ -1732,6 +1732,7 @@ type
|
||||
function DoAlignChildControls(TheAlign: TAlign; AControl: TControl;
|
||||
AControlList: TFPList; var ARect: TRect): Boolean; virtual;
|
||||
procedure DoChildSizingChange(Sender: TObject); virtual;
|
||||
procedure DoOnChangeBounds; override;
|
||||
{$IFDEF OldAutoSize}
|
||||
procedure ResizeDelayedAutoSizeChildren; virtual;
|
||||
{$ENDIF}
|
||||
|
@ -3172,6 +3172,13 @@ begin
|
||||
ReAlign;
|
||||
end;
|
||||
|
||||
procedure TWinControl.DoOnChangeBounds;
|
||||
begin
|
||||
inherited DoOnChangeBounds;
|
||||
if FUseDockManager and (DockManager<>nil) then
|
||||
DockManager.ResetBounds(false);
|
||||
end;
|
||||
|
||||
{$IFDEF OldAutoSize}
|
||||
procedure TWinControl.ResizeDelayedAutoSizeChildren;
|
||||
var
|
||||
@ -7777,8 +7784,7 @@ begin
|
||||
' -> New=',Dbgs(Bounds(ALeft,ATop,AWidth,AHeight))]);
|
||||
{$ENDIF}
|
||||
inherited SetBounds(ALeft, ATop, AWidth, AHeight);
|
||||
if FUseDockManager and (DockManager <> nil) then
|
||||
DockManager.ResetBounds(False);
|
||||
//DebugLn(['TWinControl.SetBounds ',DbgSName(Self),' FUseDockManager=',FUseDockManager,' ',DbgSName(DockManager)]);
|
||||
finally
|
||||
{$IFDEF OldAutoSize}
|
||||
UnlockRealizeBounds;
|
||||
|
Loading…
Reference in New Issue
Block a user