mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-10-30 00:21:35 +01:00
LCL: debg DisableAutoSizing
git-svn-id: trunk@53655 -
This commit is contained in:
parent
b442564a2a
commit
90b9fc6c74
@ -885,7 +885,9 @@ begin
|
||||
NewHeight:=Result.Height-Result.ClientHeight+NewClientHeight;
|
||||
Result.SetBounds(Bounds.Left,Bounds.Top,NewWidth,NewHeight);
|
||||
Result.SetClientSize(Point(NewClientWidth,NewClientHeight));
|
||||
{$IFDEF DebugDisableAutoSizing}
|
||||
debugln('TControl.CreateFloatingDockSite A ',DbgSName(Self),' ',DbgSName(Result),' ',dbgs(Result.BoundsRect));
|
||||
{$ENDIF}
|
||||
Result.EnableAutoSizing{$IFDEF DebugDisableAutoSizing}('TControl.CreateFloatingDockSite'){$ENDIF};
|
||||
end;
|
||||
end;
|
||||
@ -3828,7 +3830,8 @@ var
|
||||
begin
|
||||
if FAlign = Value then exit;
|
||||
//DebugLn(['TControl.SetAlign ',DbgSName(Self),' Old=',DbgS(FAlign),' New=',DbgS(Value),' ',Anchors<>AnchorAlign[FAlign]]);
|
||||
DisableAutoSizing{$IFDEF DebugDisableAutoSizing}('TControl.setalign'){$ENDIF};
|
||||
DisableAutoSizing{$IFDEF DebugDisableAutoSizing}('TControl.SetAlign'){$ENDIF};
|
||||
try
|
||||
OldBaseBounds:=BaseBounds;
|
||||
OldAlign := FAlign;
|
||||
FAlign := Value;
|
||||
@ -3852,7 +3855,9 @@ begin
|
||||
if not (csLoading in ComponentState) then
|
||||
BoundsRect:=OldBaseBounds;
|
||||
//DebugLn(['TControl.SetAlign ',DbgSName(Self),' Cur=',DbgS(FAlign),' New=',DbgS(Value),' ',Anchors<>AnchorAlign[FAlign],' Anchors=',dbgs(Anchors)]);
|
||||
EnableAutoSizing{$IFDEF DebugDisableAutoSizing}('TControl.setalign'){$ENDIF};
|
||||
finally
|
||||
EnableAutoSizing{$IFDEF DebugDisableAutoSizing}('TControl.SetAlign'){$ENDIF};
|
||||
end;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
|
||||
@ -96,10 +96,13 @@ var bR2L: Boolean;
|
||||
begin
|
||||
bR2L := IsRightToLeft;
|
||||
DisableAutoSizing{$IFDEF DebugDisableAutoSizing}('TCustomControlBar.AlignControlsToBands'){$ENDIF};
|
||||
try
|
||||
for aBand in FVisiBands do
|
||||
AlignControlToBand(aBand, bR2L);
|
||||
finally
|
||||
EnableAutoSizing{$IFDEF DebugDisableAutoSizing}('TCustomControlBar.AlignControlsToBands'){$ENDIF};
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCustomControlBar.AlignControlToBand(ABand: TCtrlBand; ARightToLeft: Boolean);
|
||||
begin
|
||||
@ -218,10 +221,13 @@ begin
|
||||
inherited CMBiDiModeChanged(Message);
|
||||
aWidth := Width;
|
||||
DisableAutoSizing{$IFDEF DebugDisableAutoSizing}('TCustomControlBar.CMBiDiModeChanged'){$ENDIF};
|
||||
try
|
||||
for i := 0 to FBands.Count - 1 do
|
||||
FBands[i].Left := abs(FBands[i].Left - aWidth) - FBands[i].Width;
|
||||
finally
|
||||
EnableAutoSizing{$IFDEF DebugDisableAutoSizing}('TCustomControlBar.CMBiDiModeChanged'){$ENDIF};
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCustomControlBar.CMBorderChanged(var Message: TLMessage);
|
||||
var i, aNewBevelWidth, aShift: Integer;
|
||||
|
||||
@ -6155,13 +6155,13 @@ var
|
||||
i: Integer;
|
||||
begin
|
||||
// scroll inner controls
|
||||
DisableAutoSizing;
|
||||
DisableAutoSizing{$IFDEF DebugDisableAutoSizing}('TWinControl.ScrollBy'){$ENDIF};
|
||||
try
|
||||
for i := 0 to ControlCount - 1 do
|
||||
with Controls[i] do
|
||||
SetBounds(Left + DeltaX, Top + DeltaY, Width, Height);
|
||||
finally
|
||||
EnableAutoSizing;
|
||||
EnableAutoSizing{$IFDEF DebugDisableAutoSizing}('TWinControl.ScrollBy'){$ENDIF};
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user