diff --git a/plasmoid/package/contents/config/main.xml b/plasmoid/package/contents/config/main.xml
index 74d76d63e..aa7d43268 100644
--- a/plasmoid/package/contents/config/main.xml
+++ b/plasmoid/package/contents/config/main.xml
@@ -58,21 +58,15 @@
false
-
- false
-
false
-
- false
-
- 2
+ 1
- 600
+ 300
false
diff --git a/plasmoid/package/contents/ui/config/ConfigInteraction.qml b/plasmoid/package/contents/ui/config/ConfigInteraction.qml
index 1f22c246e..76d38f14d 100644
--- a/plasmoid/package/contents/ui/config/ConfigInteraction.qml
+++ b/plasmoid/package/contents/ui/config/ConfigInteraction.qml
@@ -25,6 +25,8 @@ import QtQuick.Layouts 1.0
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents
+import org.kde.latte.private.tasks 0.1 as LatteTasks
+
Item {
width: childrenRect.width
height: childrenRect.height
@@ -33,14 +35,13 @@ Item {
property alias cfg_wheelEnabled: wheelEnabled.checked
property alias cfg_middleClickAction: middleClickAction.currentIndex
+ property alias cfg_hoverAction: hoverActionCmb.currentIndex
property alias cfg_showOnlyCurrentScreen: showOnlyCurrentScreen.checked
property alias cfg_showOnlyCurrentDesktop: showOnlyCurrentDesktop.checked
property alias cfg_showOnlyCurrentActivity: showOnlyCurrentActivity.checked
- property alias cfg_highlightWindows: highlightWindowsChk.checked
property alias cfg_showInfoBadge: showInfoBadgeChk.checked
- property alias cfg_showToolTips: showPreviewsChk.checked
property alias cfg_showWindowActions: windowActionsChk.checked
ColumnLayout{
@@ -60,18 +61,6 @@ Item {
enabled: false
}
- CheckBox {
- id: showPreviewsChk
- Layout.fillWidth: true
- text: i18n("Preview windows on hovering")
- }
-
- CheckBox {
- id: highlightWindowsChk
- Layout.fillWidth: true
- text: i18n("Highlight windows on hovering")
- }
-
CheckBox {
id: windowActionsChk
Layout.fillWidth: true
@@ -84,9 +73,11 @@ Item {
text: i18n("Show progress information for tasks")
}
- RowLayout {
+ GridLayout {
+ columns: 2
+
Label {
- text: i18n("On middle-click:")
+ text: i18n("Middle Click")
}
ComboBox {
@@ -94,6 +85,54 @@ Item {
Layout.fillWidth: true
model: [i18nc("The click action", "None"), i18n("Close Window or Group"), i18n("New Instance"), i18n("Minimize/Restore Window or Group")]
}
+
+ Label {
+ text: i18n("Hover")
+ }
+
+ ComboBox {
+ id: hoverActionCmb
+ Layout.fillWidth: true
+ model: [
+ i18nc("none action", "None"),
+ i18n("Preview Windows"),
+ i18n("Highlight Windows"),
+ i18n("Preview and Highlight Windows"),
+ ]
+
+ currentIndex: {
+ switch(plasmoid.configuration.hoverAction) {
+ case LatteTasks.Types.NoneAction:
+ return 0;
+ case LatteTasks.Types.PreviewWindows:
+ return 1;
+ case LatteTasks.Types.HighlightWindows:
+ return 2;
+ case LatteTasks.Types.PreviewAndHighlightWindows:
+ return 3;
+ }
+
+ return 0;
+ }
+
+ onCurrentIndexChanged: {
+ switch(currentIndex) {
+ case 0:
+ plasmoid.configuration.hoverAction = LatteTasks.Types.NoneAction;
+ break;
+ case 1:
+ plasmoid.configuration.hoverAction = LatteTasks.Types.PreviewWindows;
+ break;
+ case 2:
+ plasmoid.configuration.hoverAction = LatteTasks.Types.HighlightWindows;
+ break;
+ case 3:
+ plasmoid.configuration.hoverAction = LatteTasks.Types.PreviewAndHighlightWindows;
+ break;
+ }
+ }
+ }
+
}
}
}
diff --git a/plasmoid/package/contents/ui/main.qml b/plasmoid/package/contents/ui/main.qml
index 8ca199e84..cecb226bd 100644
--- a/plasmoid/package/contents/ui/main.qml
+++ b/plasmoid/package/contents/ui/main.qml
@@ -162,8 +162,7 @@ Item {
property bool disableRightSpacer: false
property bool dockIsHidden: latteView ? latteView.dockIsHidden : false
property bool groupTasksByDefault: plasmoid.configuration.groupTasksByDefault
- property bool highlightWindows: latteView ? latteView.hoverAction === LatteTasks.Types.HighlightWindows || latteView.hoverAction === LatteTasks.Types.PreviewAndHighlightWindows :
- plasmoid.configuration.highlightWindows
+ property bool highlightWindows: hoverAction === LatteTasks.Types.HighlightWindows || hoverAction === LatteTasks.Types.PreviewAndHighlightWindows
property bool parabolicEffectEnabled: latteView ? latteView.parabolicEffectEnabled : zoomFactor>1 && !root.editMode
property bool scrollingEnabled: plasmoid.configuration.scrollTasksEnabled
@@ -179,8 +178,7 @@ Item {
property bool showOnlyCurrentScreen: plasmoid.configuration.showOnlyCurrentScreen
property bool showOnlyCurrentDesktop: plasmoid.configuration.showOnlyCurrentDesktop
property bool showOnlyCurrentActivity: plasmoid.configuration.showOnlyCurrentActivity
- property bool showPreviews: latteView ? latteView.hoverAction === LatteTasks.Types.PreviewWindows || latteView.hoverAction === LatteTasks.Types.PreviewAndHighlightWindows :
- plasmoid.configuration.showToolTips
+ property bool showPreviews: hoverAction === LatteTasks.Types.PreviewWindows || hoverAction === LatteTasks.Types.PreviewAndHighlightWindows
property bool showWindowActions: plasmoid.configuration.showWindowActions
property bool showWindowsOnlyFromLaunchers: plasmoid.configuration.showWindowsOnlyFromLaunchers
diff --git a/plasmoid/package/contents/ui/task/TaskItem.qml b/plasmoid/package/contents/ui/task/TaskItem.qml
index 6d7c3bade..17bd1c603 100644
--- a/plasmoid/package/contents/ui/task/TaskItem.qml
+++ b/plasmoid/package/contents/ui/task/TaskItem.qml
@@ -1591,7 +1591,9 @@ MouseArea{
if (taskItem.containsMouse) {
if (root.showPreviews) {
showPreviewWindow();
- } else if (taskItem.isWindow && root.highlightWindows) {
+ }
+
+ if (taskItem.isWindow && root.highlightWindows) {
root.windowsHovered( root.plasma515 ? model.WinIdList : model.LegacyWinIdList , taskItem.containsMouse);
}
}