Add wheel scroll lines setting support for elastic scroll
This commit is contained in:
parent
30dc9667ec
commit
00f5bdaccd
1 changed files with 3 additions and 1 deletions
|
|
@ -25,6 +25,7 @@ constexpr auto kOverscrollFromThreshold = -(1 << 30);
|
|||
constexpr auto kOverscrollTillThreshold = (1 << 30);
|
||||
constexpr auto kTouchOverscrollMultiplier = 2;
|
||||
constexpr auto kMagicScrollMultiplier = 2.5;
|
||||
constexpr auto kDefaultWheelScrollLines = 3;
|
||||
|
||||
constexpr auto kLogA = 16.;
|
||||
constexpr auto kLogB = 10.;
|
||||
|
|
@ -1283,7 +1284,8 @@ QPoint ScrollDelta(not_null<QWheelEvent*> e, bool touch) {
|
|||
? kMagicScrollMultiplier
|
||||
: 1.);
|
||||
}
|
||||
return convert(e->angleDelta()) / kPixelToAngleDelta;
|
||||
return (convert(e->angleDelta()) * QApplication::wheelScrollLines())
|
||||
/ (kPixelToAngleDelta * kDefaultWheelScrollLines);
|
||||
}
|
||||
|
||||
} // namespace Ui
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue