From 243ece638c4992a8c4b5facbe08c2db3ace2f230 Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Thu, 11 Apr 2019 20:20:56 +0300 Subject: [PATCH] update editVisual transparency through emptyAreas --- .../package/contents/ui/editmode/Visual.qml | 14 ++++++++++++++ .../contents/ui/layouts/EnvironmentActions.qml | 5 +++++ containment/package/contents/ui/main.qml | 1 + 3 files changed, 20 insertions(+) diff --git a/containment/package/contents/ui/editmode/Visual.qml b/containment/package/contents/ui/editmode/Visual.qml index 00003bf2c..f4eebf862 100644 --- a/containment/package/contents/ui/editmode/Visual.qml +++ b/containment/package/contents/ui/editmode/Visual.qml @@ -159,6 +159,11 @@ Item{ "You can use mouse wheel to change background opacity of %0%").arg(Math.round(plasmoid.configuration.editBackgroundOpacity * 100)) onWheel: { + processWheel(wheel); + } + + + function processWheel(wheel) { if (wheelIsBlocked) { return; } @@ -175,6 +180,15 @@ Item{ } } + Connections { + target: root + onEmptyAreasWheel: { + if (root.editMode && !root.inConfigureAppletsMode) { + editBackMouseArea.processWheel(wheel); + } + } + } + //! 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 diff --git a/containment/package/contents/ui/layouts/EnvironmentActions.qml b/containment/package/contents/ui/layouts/EnvironmentActions.qml index 82df66b46..4b1b5f4b4 100644 --- a/containment/package/contents/ui/layouts/EnvironmentActions.qml +++ b/containment/package/contents/ui/layouts/EnvironmentActions.qml @@ -98,6 +98,11 @@ Loader { } onWheel: { + if (root.scrollAction === Latte.Types.ScrollNone) { + root.emptyAreasWheel(wheel); + return; + } + var delta = 0; if (wheel.angleDelta.y>=0 && wheel.angleDelta.x>=0) { diff --git a/containment/package/contents/ui/main.qml b/containment/package/contents/ui/main.qml index cf1ff9ed1..a60219d97 100644 --- a/containment/package/contents/ui/main.qml +++ b/containment/package/contents/ui/main.qml @@ -48,6 +48,7 @@ DragDrop.DropArea { //// BEGIN SIGNALS signal clearZoomSignal(); signal destroyInternalViewSplitters(); + signal emptyAreasWheel(QtObject wheel); signal separatorsUpdated(); signal signalActivateEntryAtIndex(int entryIndex); signal signalNewInstanceForEntryAtIndex(int entryIndex);