From 957fa893151765f04edab0173dc33ab7d16d7665 Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Tue, 19 Sep 2023 18:57:09 +0200 Subject: [PATCH] Core: Set the SH_Slider_AbsoluteSetButtons style for QSlider This way when the user clicks on the slider with the mouse the slider jumps under the mouse and not left and right according to the slider page. Change-Id: If36f9d8ea82f5b200e2322758f4fc25aef5e1a04 Reviewed-by: Alessandro Portale --- src/plugins/coreplugin/manhattanstyle.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/coreplugin/manhattanstyle.cpp b/src/plugins/coreplugin/manhattanstyle.cpp index e3205dae6d8..aeac11dc575 100644 --- a/src/plugins/coreplugin/manhattanstyle.cpp +++ b/src/plugins/coreplugin/manhattanstyle.cpp @@ -442,6 +442,10 @@ int ManhattanStyle::styleHint(StyleHint hint, const QStyleOption *option, const ret = QGuiApplication::keyboardModifiers() == (HostOsInfo::isMacHost() ? Qt::MetaModifier : Qt::ControlModifier); break; + case QStyle::SH_Slider_AbsoluteSetButtons: + // Make QSlider jump on left mouse click + ret = Qt::LeftButton | Qt::MiddleButton | Qt::RightButton; + break; default: break; }