mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 14:39:06 +02:00
Gtk2: fixed TScrollingWinControl moving viewport out of scrollbar max ranges.
git-svn-id: trunk@25580 -
This commit is contained in:
parent
5074140f97
commit
924cafa5b4
@ -2584,11 +2584,14 @@ begin
|
|||||||
|
|
||||||
if (AWidgetInfo^.LCLObject is TScrollingWinControl) then
|
if (AWidgetInfo^.LCLObject is TScrollingWinControl) then
|
||||||
begin
|
begin
|
||||||
MaxValue := ARange^.adjustment^.upper;
|
if ARange^.adjustment^.page_size > 0 then
|
||||||
|
MaxValue := ARange^.adjustment^.upper - ARange^.adjustment^.page_size
|
||||||
|
else
|
||||||
|
MaxValue := ARange^.adjustment^.upper;
|
||||||
if (AValue > MaxValue) or (AValue < ARange^.adjustment^.lower) then
|
if (AValue > MaxValue) or (AValue < ARange^.adjustment^.lower) then
|
||||||
begin
|
begin
|
||||||
Result := not Result;
|
Result := not Result;
|
||||||
exit;
|
AValue := MaxValue;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user