mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-24 14:59:11 +02:00
Gtk2: take care of adjustment max & min value in case of Gtk2WSScrollingWinControl
git-svn-id: trunk@24220 -
This commit is contained in:
parent
d3f232387d
commit
da4ea2af2e
@ -2587,6 +2587,20 @@ begin
|
||||
else
|
||||
Msg.Msg := LM_VSCROLL;
|
||||
|
||||
if (AWidgetInfo^.LCLObject is TScrollingWinControl) then
|
||||
begin
|
||||
{$ifdef OldAutoSize}
|
||||
MaxValue := ARange^.adjustment^.upper - ARange^.adjustment^.page_size;
|
||||
{$else}
|
||||
MaxValue := ARange^.adjustment^.upper;
|
||||
{$endif}
|
||||
if (AValue > MaxValue) or (AValue < ARange^.adjustment^.lower) then
|
||||
begin
|
||||
Result := not Result;
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
|
||||
with Msg do
|
||||
begin
|
||||
Pos := Round(AValue);
|
||||
|
Loading…
Reference in New Issue
Block a user