mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 04:18:48 +02:00
LCL: autosize: ignore invisible childs with alCustom
git-svn-id: trunk@21236 -
This commit is contained in:
parent
cff3746b3d
commit
3f4099eb7b
@ -3070,9 +3070,9 @@ begin
|
||||
if CheckPosition(Self) then
|
||||
DebugLn(['TControl.UpdateBaseBounds '+DbgSName(Self),
|
||||
' OldBounds='+dbgs(FBaseBounds),
|
||||
' OldClientSize='+dbgs(FBaseParentClientSize),
|
||||
' OldParentClientSize='+dbgs(FBaseParentClientSize),
|
||||
' NewBounds='+dbgs(NewBaseBounds),
|
||||
' NewClientSize='+dbgs(NewBaseParentClientSize),
|
||||
' NewParentClientSize='+dbgs(NewBaseParentClientSize),
|
||||
'']);
|
||||
{$ENDIF}
|
||||
FBaseBounds:=NewBaseBounds;
|
||||
|
@ -33,7 +33,7 @@
|
||||
{off $DEFINE CHECK_POSITION}
|
||||
{$IFDEF CHECK_POSITION}
|
||||
const CheckPostionClassName = 'xxTPage';
|
||||
const CheckPostionName = 'OIMiscGroupBox';
|
||||
const CheckPostionName = 'Button1';
|
||||
const CheckPostionParentName = 'xxxEnvVarsPage';
|
||||
|
||||
function CheckPosition(AControl: TControl): boolean;
|
||||
@ -1002,7 +1002,7 @@ begin
|
||||
VisibleCount:=0;
|
||||
for i:=0 to ChildCount-1 do begin
|
||||
Child:=WinControl.Controls[i];
|
||||
if Child.Align=alCustom then begin
|
||||
if (Child.Align=alCustom) and Child.IsControlVisible then begin
|
||||
// this is not LCL business
|
||||
exit;
|
||||
end;
|
||||
@ -3259,7 +3259,7 @@ begin
|
||||
AdjustClientRect(CurClientRect);
|
||||
// get minimum left, top of non aligned childs
|
||||
GetMoveDiffForNonAlignedChilds(CurClientRect,dx,dy);
|
||||
//DebugLn(['TWinControl.DoAutoSize ',DbgSName(Self),' ChildsBounds=',dbgs(ChildBounds),' CurClientRect=',dbgs(CurClientRect)]);
|
||||
//DebugLn(['TWinControl.DoAutoSize ',DbgSName(Self),' CurClientRect=',dbgs(CurClientRect)]);
|
||||
|
||||
if (dx<>0) or (dy<>0) then begin
|
||||
// move all free childs to left and top of client area
|
||||
|
Loading…
Reference in New Issue
Block a user