Use pixel delta whenever it's present

This commit is contained in:
Ilya Fedin 2023-12-23 16:41:24 +04:00 committed by John Preston
parent 30ec6ea20d
commit 88f53cf1d9

View file

@ -1277,8 +1277,7 @@ QPoint ScrollDelta(not_null<QWheelEvent*> e) {
style::ConvertScale(point.x()),
style::ConvertScale(point.y())) * kMagicScrollMultiplier;
};
if (Platform::IsMac()
|| (Platform::IsWindows() && e->phase() != Qt::NoScrollPhase)) {
if (!e->pixelDelta().isNull()) {
return convert(e->pixelDelta());
}
return convert(e->angleDelta() / kPixelToAngleDelta);