From ca6b27d179989b06e980765aa90f0673974a5424 Mon Sep 17 00:00:00 2001 From: Uyanide Date: Wed, 6 Aug 2025 02:18:45 +0200 Subject: [PATCH] fix: scrolling to fast with horizental scroll wheel --- src/main_window.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main_window.cpp b/src/main_window.cpp index ababc65..edfddbf 100644 --- a/src/main_window.cpp +++ b/src/main_window.cpp @@ -1,7 +1,7 @@ /* * @Author: Uyanide pywang0608@foxmail.com * @Date: 2025-08-05 00:37:58 - * @LastEditTime: 2025-08-06 02:13:59 + * @LastEditTime: 2025-08-06 02:16:25 * @Description: MainWindow implementation. */ #include "main_window.h" @@ -73,10 +73,11 @@ void MainWindow::keyPressEvent(QKeyEvent *event) { void MainWindow::wheelEvent(QWheelEvent *event) { if (event->angleDelta().y() > 0) { m_carousel->focusPrevImage(); - } else { + } else if (event->angleDelta().y() < 0) { m_carousel->focusNextImage(); + } else { + QMainWindow::wheelEvent(event); } - event->accept(); } void MainWindow::onConfirm() {