From fe0ec6ba42677f7b9c62126c91d1d95d9ae665ed Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Sat, 12 Aug 2017 19:52:41 +0300 Subject: [PATCH] fix #666,provide scroll wheel based on directions --when the dock is hidden or in animation no mouse wheel actions are accepted --laucher: only the up action is accepted in order to activate that launcher --window: up action shows the window, if it is shown nothing happens, down actions, minimizes the window, it is is already minimized nothing happens --group: up/down to cycle through the windows --- containment/package/contents/ui/main.qml | 2 ++ .../package/contents/ui/task/TaskDelegate.qml | 15 ++++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/containment/package/contents/ui/main.qml b/containment/package/contents/ui/main.qml index f723d9c7b..dfa66a763 100644 --- a/containment/package/contents/ui/main.qml +++ b/containment/package/contents/ui/main.qml @@ -86,6 +86,8 @@ DragDrop.DropArea { property bool immutable: plasmoid.immutable property bool indicateAudioStreams: plasmoid.configuration.indicateAudioStreams property bool inFullJustify: (plasmoid.configuration.panelPosition === Latte.Dock.Justify) && (plasmoid.configuration.maxLength===100) + property bool inSlidingIn: visibilityManager ? visibilityManager.inSlidingIn : false + property bool inSlidingOut: visibilityManager ? visibilityManager.inSlidingOut : false property bool inStartup: true property bool isHalfShown: false //is used to disable the zoom hovering effect at sliding in-out the dock property bool isHorizontal: plasmoid.formFactor === PlasmaCore.Types.Horizontal diff --git a/plasmoid/package/contents/ui/task/TaskDelegate.qml b/plasmoid/package/contents/ui/task/TaskDelegate.qml index 4c3eeefb1..a297d2d33 100644 --- a/plasmoid/package/contents/ui/task/TaskDelegate.qml +++ b/plasmoid/package/contents/ui/task/TaskDelegate.qml @@ -767,7 +767,8 @@ MouseArea{ } onWheel: { - if (isSeparator || !root.mouseWheelActions) { + if (isSeparator || !root.mouseWheelActions + || (latteDock && (latteDock.dockIsHidden || latteDock.inSlidingIn || latteDock.inSlidingOut))){ return; } @@ -781,22 +782,22 @@ MouseArea{ } else if (isGroupParent) { tasksWindows.activateNextTask(); } else { - activateTask(); + tasksModel.requestActivate(modelIndex()); } //negative direction } else if (angle < 12) { if (isLauncher) { - mouseEntered = false; - wrapper.runLauncherAnimation(); + //mouseEntered = false; + //wrapper.runLauncherAnimation(); } else if (isGroupParent) { tasksWindows.activatePreviousTask(); } else { if (IsMinimized === true) { - var i = modelIndex(); + /*var i = modelIndex(); tasksModel.requestToggleMinimized(i); - tasksModel.requestActivate(i); + tasksModel.requestActivate(i);*/ } else if (IsActive === true) { - tasksModel.requestToggleMinimized(modelIndex()); + tasksModel.requestToggleMinimized(modelIndex()); } else { tasksModel.requestActivate(modelIndex()); }