mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 22:59:15 +02:00
Qt: improved mousewheel scroll by Mattias. fixes #16560
git-svn-id: trunk@25687 -
This commit is contained in:
parent
ef82ad9e79
commit
b35fff5bcc
@ -5144,6 +5144,8 @@ var
|
||||
var
|
||||
iReCountMax: Integer;
|
||||
SBUpdatesCount: Integer;
|
||||
i: Integer;
|
||||
WheelLines: Integer;
|
||||
begin
|
||||
Result := 0;
|
||||
SBUpdatesCount := 0;
|
||||
@ -5168,6 +5170,12 @@ var
|
||||
begin
|
||||
inc(SBUpdatesCount);
|
||||
ScrollBar.setPageStep(ScrollInfo.nPage);
|
||||
WheelLines := QApplication_wheelScrollLines();
|
||||
with Scrollbar do
|
||||
begin
|
||||
i := Max(1, floor((GetPageStep / WheelLines) / 6));
|
||||
setSingleStep(i);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user