Use pixel delta whenever it's present
This commit is contained in:
parent
30ec6ea20d
commit
88f53cf1d9
1 changed files with 1 additions and 2 deletions
|
|
@ -1277,8 +1277,7 @@ QPoint ScrollDelta(not_null<QWheelEvent*> e) {
|
||||||
style::ConvertScale(point.x()),
|
style::ConvertScale(point.x()),
|
||||||
style::ConvertScale(point.y())) * kMagicScrollMultiplier;
|
style::ConvertScale(point.y())) * kMagicScrollMultiplier;
|
||||||
};
|
};
|
||||||
if (Platform::IsMac()
|
if (!e->pixelDelta().isNull()) {
|
||||||
|| (Platform::IsWindows() && e->phase() != Qt::NoScrollPhase)) {
|
|
||||||
return convert(e->pixelDelta());
|
return convert(e->pixelDelta());
|
||||||
}
|
}
|
||||||
return convert(e->angleDelta() / kPixelToAngleDelta);
|
return convert(e->angleDelta() / kPixelToAngleDelta);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue