1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-02-19 17:57:39 +03:00

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
This commit is contained in:
Michail Vourlakos 2017-08-12 19:52:41 +03:00
parent 575dd5fa99
commit fe0ec6ba42
2 changed files with 10 additions and 7 deletions

View File

@ -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

View File

@ -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());
}