mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 02:19:32 +02:00
LCL: improved debugging changebounds, removed TCustomLabel AdjustSize in loaded
git-svn-id: trunk@24075 -
This commit is contained in:
parent
3f79d12265
commit
62fc1305ad
@ -56,8 +56,9 @@ begin
|
|||||||
if (Parent=nil) and (not (cfAutoSizeNeeded in FControlFlags))
|
if (Parent=nil) and (not (cfAutoSizeNeeded in FControlFlags))
|
||||||
and (Self is TCustomForm) then begin
|
and (Self is TCustomForm) then begin
|
||||||
DebugLn(['TControl.Adjustsize ',DbgSName(Self)]);
|
DebugLn(['TControl.Adjustsize ',DbgSName(Self)]);
|
||||||
if Name='SearchResultsView' then begin
|
if Name='SearchResults' then begin
|
||||||
debugln(GetStackTrace(true));
|
//debugln(GetStackTrace(true));
|
||||||
|
DebugLn(['TControl.Adjustsize AAA1']);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
@ -365,7 +366,7 @@ begin
|
|||||||
PosChanged := (FLeft <> ALeft) or (FTop <> ATop);
|
PosChanged := (FLeft <> ALeft) or (FTop <> ATop);
|
||||||
if (not SizeChanged) and (not PosChanged) then Exit;
|
if (not SizeChanged) and (not PosChanged) then Exit;
|
||||||
|
|
||||||
//DebugLn('TControl.ChangeBounds A ',Name,':',ClassName);
|
//DebugLn('TControl.ChangeBounds A ',DbgSName(Self),' Old=',dbgs(BoundsRect),' New=',dbgs(NewBounds));
|
||||||
if (not (csLoading in ComponentState))
|
if (not (csLoading in ComponentState))
|
||||||
and (not (Self is TWinControl)) then
|
and (not (Self is TWinControl)) then
|
||||||
InvalidateControl(IsControlVisible, False, true);
|
InvalidateControl(IsControlVisible, False, true);
|
||||||
@ -2392,7 +2393,9 @@ end;
|
|||||||
procedure TControl.DoAutoSize;
|
procedure TControl.DoAutoSize;
|
||||||
begin
|
begin
|
||||||
//Handled by TWinControl, or other descendants
|
//Handled by TWinControl, or other descendants
|
||||||
|
{$IFNDEF OldAutoSize}
|
||||||
Exclude(FControlFlags,cfAutoSizeNeeded);
|
Exclude(FControlFlags,cfAutoSizeNeeded);
|
||||||
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
|
@ -84,6 +84,7 @@ var
|
|||||||
NewWidth, NewHeight: integer;
|
NewWidth, NewHeight: integer;
|
||||||
CurAnchors: TAnchors;
|
CurAnchors: TAnchors;
|
||||||
begin
|
begin
|
||||||
|
inherited DoAutoSize;
|
||||||
//debugln('TCustomLabel.DoAutoSize ',DbgSName(Self),' AutoSizing=',dbgs(AutoSizing),' AutoSize=',dbgs(AutoSize),' Parent=',DbgSName(Parent),' csLoading=',dbgs(csLoading in ComponentState),' Parnet.HandleAllocated=',dbgs((Parent<>nil) and (Parent.HandleAllocated)));
|
//debugln('TCustomLabel.DoAutoSize ',DbgSName(Self),' AutoSizing=',dbgs(AutoSizing),' AutoSize=',dbgs(AutoSize),' Parent=',DbgSName(Parent),' csLoading=',dbgs(csLoading in ComponentState),' Parnet.HandleAllocated=',dbgs((Parent<>nil) and (Parent.HandleAllocated)));
|
||||||
if OptimalFill and (not AutoSize) then
|
if OptimalFill and (not AutoSize) then
|
||||||
begin
|
begin
|
||||||
@ -298,7 +299,9 @@ end;
|
|||||||
procedure TCustomLabel.Loaded;
|
procedure TCustomLabel.Loaded;
|
||||||
begin
|
begin
|
||||||
inherited Loaded;
|
inherited Loaded;
|
||||||
|
{$IFNDEF OldAutoSize}
|
||||||
AdjustSize;
|
AdjustSize;
|
||||||
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCustomLabel.UpdateSize;
|
procedure TCustomLabel.UpdateSize;
|
||||||
|
Loading…
Reference in New Issue
Block a user