diff --git a/containment/package/contents/ui/layouts/EnvironmentActions.qml b/containment/package/contents/ui/layouts/EnvironmentActions.qml index 1318321cc..39ee61f5e 100644 --- a/containment/package/contents/ui/layouts/EnvironmentActions.qml +++ b/containment/package/contents/ui/layouts/EnvironmentActions.qml @@ -47,6 +47,8 @@ Loader { return useAllLayouts ? root.maxLength : root.realPanelLength; } + property bool wheelIsBlocked: false + hoverEnabled: true readonly property bool useAllLayouts: panelUserSetAlignment === Latte.Types.Justify && !root.inConfigureAppletsMode @@ -113,11 +115,18 @@ Loader { } onWheel: { + if (wheelIsBlocked) { + return; + } + if (root.scrollAction === Latte.Types.ScrollNone) { root.emptyAreasWheel(wheel); return; } + wheelIsBlocked = true; + scrollDelayer.start(); + var delta = 0; if (wheel.angleDelta.y>=0 && wheel.angleDelta.x>=0) { @@ -194,6 +203,17 @@ Loader { } } + //! A timer is needed in order to handle also touchpads that probably + //! send too many signals very fast. This way the signals per sec are limited. + //! The user needs to have a steady normal scroll in order to not + //! notice a annoying delay + Timer{ + id: scrollDelayer + + interval: 200 + onTriggered: mainArea.wheelIsBlocked = false; + } + //! Background Indicator Indicator.Bridge{ id: indicatorBridge