mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-28 23:19:08 +01: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
|
var
|
||||||
iReCountMax: Integer;
|
iReCountMax: Integer;
|
||||||
SBUpdatesCount: Integer;
|
SBUpdatesCount: Integer;
|
||||||
|
i: Integer;
|
||||||
|
WheelLines: Integer;
|
||||||
begin
|
begin
|
||||||
Result := 0;
|
Result := 0;
|
||||||
SBUpdatesCount := 0;
|
SBUpdatesCount := 0;
|
||||||
@ -5168,6 +5170,12 @@ var
|
|||||||
begin
|
begin
|
||||||
inc(SBUpdatesCount);
|
inc(SBUpdatesCount);
|
||||||
ScrollBar.setPageStep(ScrollInfo.nPage);
|
ScrollBar.setPageStep(ScrollInfo.nPage);
|
||||||
|
WheelLines := QApplication_wheelScrollLines();
|
||||||
|
with Scrollbar do
|
||||||
|
begin
|
||||||
|
i := Max(1, floor((GetPageStep / WheelLines) / 6));
|
||||||
|
setSingleStep(i);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user