diff --git a/Telegram/SourceFiles/editor/editor_paint.cpp b/Telegram/SourceFiles/editor/editor_paint.cpp index 5a28ee302f..15577df5c8 100644 --- a/Telegram/SourceFiles/editor/editor_paint.cpp +++ b/Telegram/SourceFiles/editor/editor_paint.cpp @@ -438,7 +438,8 @@ bool Paint::eventFilter(QObject *obj, QEvent *e) { } if (e->type() == QEvent::Wheel) { const auto wheel = static_cast(e); - const auto delta = wheel->angleDelta().y(); + const auto raw = wheel->angleDelta(); + const auto delta = raw.y() ? raw.y() : raw.x(); if (!delta) { return true; } diff --git a/Telegram/SourceFiles/editor/photo_editor_content.cpp b/Telegram/SourceFiles/editor/photo_editor_content.cpp index 97a56a706b..ef83d6b8a8 100644 --- a/Telegram/SourceFiles/editor/photo_editor_content.cpp +++ b/Telegram/SourceFiles/editor/photo_editor_content.cpp @@ -125,8 +125,9 @@ PhotoEditorContent::PhotoEditorContent( const auto type = e->type(); if (type == QEvent::Wheel) { const auto wheel = static_cast(e.get()); + const auto raw = wheel->angleDelta(); _paint->zoomSceneItems( - wheel->angleDelta().y(), + raw.y() ? raw.y() : raw.x(), wheel->modifiers().testFlag(Qt::ShiftModifier)); e->accept(); } else if (type == QEvent::MouseButtonPress) {