mirror of
https://github.com/KDE/latte-dock.git
synced 2025-01-13 21:18:01 +03:00
rename actions for LatteContainment.scrollActions
This commit is contained in:
parent
2526ab7e17
commit
39fbf728d5
@ -24,6 +24,8 @@ import org.kde.plasma.plasmoid 2.0
|
||||
|
||||
import org.kde.latte.core 0.2 as LatteCore
|
||||
|
||||
import org.kde.latte.private.containment 0.1 as LatteContainment
|
||||
|
||||
import "loaders" as Loaders
|
||||
import "indicator" as Indicator
|
||||
import "../applet/indicator" as AppletIndicator
|
||||
@ -124,7 +126,7 @@ Loader {
|
||||
return;
|
||||
}
|
||||
|
||||
if (root.scrollAction === LatteCore.Types.ScrollNone) {
|
||||
if (root.scrollAction === LatteContainment.Types.ScrollNone) {
|
||||
root.emptyAreasWheel(wheel);
|
||||
return;
|
||||
}
|
||||
@ -146,11 +148,11 @@ Loader {
|
||||
|
||||
if (angle>10) {
|
||||
//! upwards
|
||||
if (root.scrollAction === LatteCore.Types.ScrollDesktops) {
|
||||
if (root.scrollAction === LatteContainment.Types.ScrollDesktops) {
|
||||
latteView.windowsTracker.switchToPreviousVirtualDesktop();
|
||||
} else if (root.scrollAction === LatteCore.Types.ScrollActivities) {
|
||||
} else if (root.scrollAction === LatteContainment.Types.ScrollActivities) {
|
||||
latteView.windowsTracker.switchToPreviousActivity();
|
||||
} else if (root.scrollAction === LatteCore.Types.ScrollToggleMinimized) {
|
||||
} else if (root.scrollAction === LatteContainment.Types.ScrollToggleMinimized) {
|
||||
if (!ctrlPressed) {
|
||||
tasksLoader.item.activateNextPrevTask(true);
|
||||
} else if (!selectedWindowsTracker.lastActiveWindow.isMaximized){
|
||||
@ -161,11 +163,11 @@ Loader {
|
||||
}
|
||||
} else if (angle<-10) {
|
||||
//! downwards
|
||||
if (root.scrollAction === LatteCore.Types.ScrollDesktops) {
|
||||
if (root.scrollAction === LatteContainment.Types.ScrollDesktops) {
|
||||
latteView.windowsTracker.switchToNextVirtualDesktop();
|
||||
} else if (root.scrollAction === LatteCore.Types.ScrollActivities) {
|
||||
} else if (root.scrollAction === LatteContainment.Types.ScrollActivities) {
|
||||
latteView.windowsTracker.switchToNextActivity();
|
||||
} else if (root.scrollAction === LatteCore.Types.ScrollToggleMinimized) {
|
||||
} else if (root.scrollAction === LatteContainment.Types.ScrollToggleMinimized) {
|
||||
if (!ctrlPressed) {
|
||||
if (selectedWindowsTracker.lastActiveWindow.isValid
|
||||
&& !selectedWindowsTracker.lastActiveWindow.isMinimized
|
||||
|
@ -26,6 +26,7 @@ import org.kde.plasma.plasmoid 2.0
|
||||
import org.kde.plasma.core 2.0 as PlasmaCore
|
||||
|
||||
import org.kde.latte.core 0.2 as LatteCore
|
||||
import org.kde.latte.private.containment 0.1 as LatteContainment
|
||||
|
||||
import "../../code/HeuristicTools.js" as HeuristicTools
|
||||
|
||||
@ -183,7 +184,7 @@ Item{
|
||||
onYChanged: root.updateEffectsArea();
|
||||
|
||||
EnvironmentActions {
|
||||
active: root.scrollAction !== LatteCore.Types.ScrollNone || root.dragActiveWindowEnabled || root.closeActiveWindowEnabled
|
||||
active: root.scrollAction !== LatteContainment.Types.ScrollNone || root.dragActiveWindowEnabled || root.closeActiveWindowEnabled
|
||||
alignment: _mainLayout.alignment
|
||||
}
|
||||
|
||||
|
@ -22,10 +22,11 @@ import QtQuick 2.7
|
||||
import org.kde.taskmanager 0.1 as TaskManager
|
||||
|
||||
import org.kde.latte.core 0.2 as LatteCore
|
||||
import org.kde.latte.private.containment 0.1 as LatteContainment
|
||||
|
||||
Loader {
|
||||
id: tasksLoader
|
||||
active: root.scrollAction === LatteCore.Types.ScrollTasks || root.scrollAction === LatteCore.Types.ScrollToggleMinimized
|
||||
active: root.scrollAction === LatteContainment.Types.ScrollTasks || root.scrollAction === LatteContainment.Types.ScrollToggleMinimized
|
||||
sourceComponent: Item {
|
||||
TaskManager.TasksModel {
|
||||
id: tasksModel
|
||||
|
@ -36,6 +36,16 @@ public:
|
||||
Types() = delete;
|
||||
~Types() {}
|
||||
|
||||
enum ScrollAction
|
||||
{
|
||||
ScrollNone = 0,
|
||||
ScrollDesktops,
|
||||
ScrollActivities,
|
||||
ScrollTasks,
|
||||
ScrollToggleMinimized
|
||||
};
|
||||
Q_ENUM(ScrollAction);
|
||||
|
||||
enum ActiveWindowFilterGroup
|
||||
{
|
||||
ActiveInCurrentScreen = 0,
|
||||
|
@ -904,7 +904,7 @@ MouseArea{
|
||||
}
|
||||
|
||||
onWheel: {
|
||||
var wheelActionsEnabled = (root.taskScrollAction !== LatteCore.Types.ScrollNone || manualScrollTasksEnabled);
|
||||
var wheelActionsEnabled = (root.taskScrollAction !== LatteTasks.Types.ScrollNone || manualScrollTasksEnabled);
|
||||
|
||||
if (isSeparator
|
||||
|| wheelIsBlocked
|
||||
|
@ -660,20 +660,20 @@ PlasmaComponents.Page {
|
||||
|
||||
onCurrentIndexChanged: {
|
||||
switch(currentIndex) {
|
||||
case LatteCore.Types.ScrollNone:
|
||||
plasmoid.configuration.scrollAction = LatteCore.Types.ScrollNone;
|
||||
case LatteContainment.Types.ScrollNone:
|
||||
plasmoid.configuration.scrollAction = LatteContainment.Types.ScrollNone;
|
||||
break;
|
||||
case LatteCore.Types.ScrollDesktops:
|
||||
plasmoid.configuration.scrollAction = LatteCore.Types.ScrollDesktops;
|
||||
case LatteContainment.Types.ScrollDesktops:
|
||||
plasmoid.configuration.scrollAction = LatteContainment.Types.ScrollDesktops;
|
||||
break;
|
||||
case LatteCore.Types.ScrollActivities:
|
||||
plasmoid.configuration.scrollAction = LatteCore.Types.ScrollActivities;
|
||||
case LatteContainment.Types.ScrollActivities:
|
||||
plasmoid.configuration.scrollAction = LatteContainment.Types.ScrollActivities;
|
||||
break;
|
||||
case LatteCore.Types.ScrollTasks:
|
||||
plasmoid.configuration.scrollAction = LatteCore.Types.ScrollTasks;
|
||||
case LatteContainment.Types.ScrollTasks:
|
||||
plasmoid.configuration.scrollAction = LatteContainment.Types.ScrollTasks;
|
||||
break;
|
||||
case LatteCore.Types.ScrollToggleMinimized:
|
||||
plasmoid.configuration.scrollAction = LatteCore.Types.ScrollToggleMinimized;
|
||||
case LatteContainment.Types.ScrollToggleMinimized:
|
||||
plasmoid.configuration.scrollAction = LatteContainment.Types.ScrollToggleMinimized;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -29,6 +29,7 @@ import org.kde.plasma.components 2.0 as PlasmaComponents
|
||||
import org.kde.plasma.plasmoid 2.0
|
||||
|
||||
import org.kde.latte.core 0.2 as LatteCore
|
||||
import org.kde.latte.private.containment 0.1 as LatteContainment
|
||||
|
||||
Grid {
|
||||
id: typeRow
|
||||
@ -82,7 +83,7 @@ Grid {
|
||||
|
||||
//! Empty Areas
|
||||
plasmoid.configuration.dragActiveWindowEnabled = false;
|
||||
plasmoid.configuration.scrollAction = LatteCore.Types.ScrollNone;
|
||||
plasmoid.configuration.scrollAction = LatteContainment.Types.ScrollNone;
|
||||
|
||||
//! Animations
|
||||
plasmoid.configuration.animationLauncherBouncing = true;
|
||||
|
Loading…
Reference in New Issue
Block a user