From 8cfb9350bc2931224d4be597c3650c0b808e4e2c Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Mon, 10 Dec 2018 10:36:55 +0100 Subject: [PATCH] Add a mouse area to gather the scroll events in the settings panel Contributes to CURA-5941. --- resources/qml/Settings/SettingView.qml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/resources/qml/Settings/SettingView.qml b/resources/qml/Settings/SettingView.qml index 3f84296307..9904770281 100644 --- a/resources/qml/Settings/SettingView.qml +++ b/resources/qml/Settings/SettingView.qml @@ -168,8 +168,10 @@ Item style: ButtonStyle { - background: Item { - UM.RecolorImage { + background: Item + { + UM.RecolorImage + { anchors.verticalCenter: parent.verticalCenter anchors.horizontalCenter: parent.horizontalCenter width: UM.Theme.getSize("standard_arrow").width @@ -180,8 +182,9 @@ Item source: UM.Theme.getIcon("menu") } } - label: Label{} + label: Label {} } + menu: SettingVisibilityPresetsMenu { onShowAllSettings: @@ -192,6 +195,14 @@ Item } } + // Mouse area that gathers the scroll events to not propagate it to the main view. + MouseArea + { + anchors.fill: scrollView + acceptedButtons: Qt.AllButtons + onWheel: wheel.accepted = true + } + ScrollView { id: scrollView