mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 13:30:37 +02:00
LCL: TControlScrollBar: ignore akBottom/akRight anchored controls
git-svn-id: trunk@18101 -
This commit is contained in:
parent
3df9f2143a
commit
0a9b9940a9
@ -245,13 +245,15 @@ procedure TControlScrollBar.AutoCalcRange;
|
|||||||
c: TControl;
|
c: TControl;
|
||||||
begin
|
begin
|
||||||
TmpRange := 0;
|
TmpRange := 0;
|
||||||
For I := 0 to FControl.ControlCount - 1 do begin
|
for I := 0 to FControl.ControlCount - 1 do
|
||||||
|
begin
|
||||||
c:=FControl.Controls[I];
|
c:=FControl.Controls[I];
|
||||||
if not c.IsControlVisible then continue;
|
if not c.IsControlVisible then continue;
|
||||||
if c.Align=alCustom then continue;
|
if c.Align=alCustom then continue;
|
||||||
if akBottom in c.Anchors then continue;
|
if akBottom in c.Anchors then continue;
|
||||||
if (c.Align<>alNone) and (akBottom in AnchorAlign[c.Align]) then continue;
|
if (c.Align<>alNone) and (akBottom in AnchorAlign[c.Align]) then continue;
|
||||||
if (FControl.ChildSizing.Layout<>cclNone) and IsNonAligned(c) then continue;
|
if (FControl.ChildSizing.Layout<>cclNone) and IsNonAligned(c) then continue;
|
||||||
|
if (akTop in c.Anchors) and (c.AnchorSide[akTop].Control <> nil) then continue;
|
||||||
TmpRange := Max(TmpRange, c.Top + c.Height);
|
TmpRange := Max(TmpRange, c.Top + c.Height);
|
||||||
end;
|
end;
|
||||||
Range := TmpRange;
|
Range := TmpRange;
|
||||||
@ -264,14 +266,15 @@ procedure TControlScrollBar.AutoCalcRange;
|
|||||||
c: TControl;
|
c: TControl;
|
||||||
begin
|
begin
|
||||||
TmpRange := 0;
|
TmpRange := 0;
|
||||||
for i := 0 to FControl.ControlCount - 1 do begin
|
for i := 0 to FControl.ControlCount - 1 do
|
||||||
|
begin
|
||||||
c:=FControl.Controls[I];
|
c:=FControl.Controls[I];
|
||||||
if not c.IsControlVisible then continue;
|
if not c.IsControlVisible then continue;
|
||||||
if c.Align=alCustom then continue;
|
if c.Align=alCustom then continue;
|
||||||
if akRight in c.Anchors then continue;
|
if akRight in c.Anchors then continue;
|
||||||
if (c.Align<>alNone) and (akRight in AnchorAlign[c.Align]) then continue;
|
if (c.Align<>alNone) and (akRight in AnchorAlign[c.Align]) then continue;
|
||||||
if (FControl.ChildSizing.Layout<>cclNone)
|
if (FControl.ChildSizing.Layout<>cclNone) and IsNonAligned(c) then continue;
|
||||||
and IsNonAligned(c) then continue;
|
if (akLeft in c.Anchors) and (c.AnchorSide[akLeft].Control <> nil) then continue;
|
||||||
TmpRange := Max(TmpRange, c.Left + c.Width);
|
TmpRange := Max(TmpRange, c.Left + c.Width);
|
||||||
end;
|
end;
|
||||||
Range := TmpRange;
|
Range := TmpRange;
|
||||||
|
Loading…
Reference in New Issue
Block a user