From 88f53cf1d9e79b4896656e49292bd7b21d64ae0f Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Sat, 23 Dec 2023 16:41:24 +0400 Subject: [PATCH] Use pixel delta whenever it's present --- ui/widgets/elastic_scroll.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ui/widgets/elastic_scroll.cpp b/ui/widgets/elastic_scroll.cpp index b089172..f20dc81 100644 --- a/ui/widgets/elastic_scroll.cpp +++ b/ui/widgets/elastic_scroll.cpp @@ -1277,8 +1277,7 @@ QPoint ScrollDelta(not_null 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);