From e54cbb721379cfad3c9d487559a65ed79be486a1 Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Mon, 2 Jan 2017 21:16:35 +0200 Subject: [PATCH] expose interaction values from plasmoid --- containment/contents/config/main.xml | 12 ++++ containment/contents/ui/main.qml | 4 ++ plasmoid/contents/ui/ContextMenu.qml | 8 +-- plasmoid/contents/ui/TaskIconItem.qml | 2 +- plasmoid/contents/ui/ToolTipDelegate.qml | 2 +- plasmoid/contents/ui/main.qml | 7 ++- shell/contents/configuration/TasksConfig.qml | 59 ++++++++++++++++++++ 7 files changed, 86 insertions(+), 8 deletions(-) diff --git a/containment/contents/config/main.xml b/containment/contents/config/main.xml index 21a0ab57c..28db87edb 100644 --- a/containment/contents/config/main.xml +++ b/containment/contents/config/main.xml @@ -75,5 +75,17 @@ 2 + + true + + + false + + + false + + + false + diff --git a/containment/contents/ui/main.qml b/containment/contents/ui/main.qml index 87dd12f0b..57ef3668f 100644 --- a/containment/contents/ui/main.qml +++ b/containment/contents/ui/main.qml @@ -101,8 +101,12 @@ DragDrop.DropArea { ///BEGIN properties provided to Latte Plasmoid property bool enableShadows: plasmoid.configuration.shadows property bool dotsOnActive: plasmoid.configuration.dotsOnActive + property bool highlightWindows: plasmoid.configuration.highlightWindows property bool reverseLinesPosition: plasmoid.configuration.reverseLinesPosition// nowDock ? nowDock.reverseLinesPosition : false property bool showGlow: plasmoid.configuration.showGlow + property bool showToolTips: plasmoid.configuration.showToolTips + property bool showWindowActions: plasmoid.configuration.showWindowActions + property bool smartLaunchersEnabled: plasmoid.configuration.smartLaunchersEnabled property bool threeColorsWindows: plasmoid.configuration.threeColorsWindows property int durationTime: plasmoid.configuration.durationTime diff --git a/plasmoid/contents/ui/ContextMenu.qml b/plasmoid/contents/ui/ContextMenu.qml index b173bab78..a1e4f31d7 100644 --- a/plasmoid/contents/ui/ContextMenu.qml +++ b/plasmoid/contents/ui/ContextMenu.qml @@ -393,7 +393,7 @@ PlasmaComponents.ContextMenu { visible: (visualParent && visualParent.m.IsLauncher !== true && visualParent.m.IsStartup !== true - && plasmoid.configuration.showWindowActions) + && root.showWindowActions) enabled: visualParent && visualParent.m.IsMinimizable === true @@ -409,7 +409,7 @@ PlasmaComponents.ContextMenu { visible: (visualParent && visualParent.m.IsLauncher !== true && visualParent.m.IsStartup !== true - && plasmoid.configuration.showWindowActions) + && root.showWindowActions) enabled: visualParent && visualParent.m.IsMaximizable === true @@ -427,7 +427,7 @@ PlasmaComponents.ContextMenu { visible: (visualParent && visualParent.m.IsLauncher !== true && visualParent.m.IsStartup !== true - && plasmoid.configuration.showWindowActions) + && root.showWindowActions) enabled: visible @@ -531,7 +531,7 @@ PlasmaComponents.ContextMenu { visible: (visualParent && visualParent.m.IsLauncher !== true && visualParent.m.IsStartup !== true - && plasmoid.configuration.showWindowActions) + && root.showWindowActions) } PlasmaComponents.MenuItem { diff --git a/plasmoid/contents/ui/TaskIconItem.qml b/plasmoid/contents/ui/TaskIconItem.qml index da9a3bb06..9a902c05c 100644 --- a/plasmoid/contents/ui/TaskIconItem.qml +++ b/plasmoid/contents/ui/TaskIconItem.qml @@ -54,7 +54,7 @@ Item{ property int shadowSize : Math.ceil(root.iconSize / 10) - readonly property bool smartLauncherEnabled: ((mainItemContainer.isStartup === false) && (plasmoid.configuration.smartLaunchersEnabled)) + readonly property bool smartLauncherEnabled: ((mainItemContainer.isStartup === false) && (root.smartLaunchersEnabled)) readonly property variant iconDecoration: decoration property QtObject buffers: null property QtObject smartLauncherItem: null diff --git a/plasmoid/contents/ui/ToolTipDelegate.qml b/plasmoid/contents/ui/ToolTipDelegate.qml index de1fd875a..8284d400e 100644 --- a/plasmoid/contents/ui/ToolTipDelegate.qml +++ b/plasmoid/contents/ui/ToolTipDelegate.qml @@ -199,7 +199,7 @@ MouseArea{ spacing: units.largeSpacing Repeater { - model: (plasmoid.configuration.showToolTips && !albumArtImage.available) + model: (root.showPreviews && !albumArtImage.available) || !windowSystem.compositingActive ? windows : null Column{ diff --git a/plasmoid/contents/ui/main.qml b/plasmoid/contents/ui/main.qml index e41b57710..85f3594b8 100644 --- a/plasmoid/contents/ui/main.qml +++ b/plasmoid/contents/ui/main.qml @@ -57,7 +57,6 @@ Item { property bool initializatedBuffers: noInitCreatedBuffers >= tasksStarting ? true : false property bool isHovered: false property bool showBarLine: plasmoid.configuration.showBarLine - property bool showPreviews: plasmoid.configuration.showToolTips property bool useThemePanel: plasmoid.configuration.useThemePanel property bool taskInAnimation: noTasksInAnimation > 0 ? true : false property bool transparentPanel: plasmoid.configuration.transparentPanel @@ -95,9 +94,13 @@ Item { property bool forceHidePanel: false property bool disableLeftSpacer: false property bool disableRightSpacer: false + property bool highlightWindows: nowDockPanel ? nowDockPanel.highlightWindows: plasmoid.configuration.highlightWindows property bool reverseLinesPosition: nowDockPanel ? nowDockPanel.reverseLinesPosition : plasmoid.configuration.reverseLinesPosition property bool dotsOnActive: nowDockPanel ? nowDockPanel.dotsOnActive : plasmoid.configuration.dotsOnActive property bool showGlow: nowDockPanel ? nowDockPanel.showGlow : plasmoid.configuration.showGlow + property bool showPreviews: nowDockPanel ? nowDockPanel.showToolTips : plasmoid.configuration.showToolTips + property bool showWindowActions: nowDockPanel ? nowDockPanel.showWindowActions : plasmoid.configuration.showWindowActions + property bool smartLaunchersEnabled: nowDockPanel ? nowDockPanel.smartLaunchersEnabled : plasmoid.configuration.smartLaunchersEnabled property bool threeColorsWindows: nowDockPanel ? nowDockPanel.threeColorsWindows : plasmoid.configuration.threeColorsWindows property int durationTime: nowDockPanel ? nowDockPanel.durationTime : plasmoid.configuration.durationTime @@ -327,7 +330,7 @@ Item { taskManagerItem: root toolTipItem: toolTipDelegate - highlightWindows: plasmoid.configuration.highlightWindows + highlightWindows:root.highlightWindows onAddLauncher: { tasksModel.requestAddLauncher(url); diff --git a/shell/contents/configuration/TasksConfig.qml b/shell/contents/configuration/TasksConfig.qml index dcd977345..4a23dd9f2 100644 --- a/shell/contents/configuration/TasksConfig.qml +++ b/shell/contents/configuration/TasksConfig.qml @@ -16,6 +16,8 @@ PlasmaComponents.Page{ Column{ spacing: 1.5*theme.defaultFont.pointSize width: parent.width + + /******Appearance******/ Column{ width:parent.width spacing: 0.8*theme.defaultFont.pointSize @@ -24,6 +26,8 @@ PlasmaComponents.Page{ text: i18n("Appearance") } + + PlasmaComponents.CheckBox { id: showGlow text: i18n("Show glow around windows points") @@ -68,5 +72,60 @@ PlasmaComponents.Page{ Component.onCompleted: checked = plasmoid.configuration.reverseLinesPosition; } } + + /*********Behavior************/ + Column{ + width:parent.width + spacing: 0.8*theme.defaultFont.pointSize + + Header{ + text: i18n("Behavior") + } + + + PlasmaComponents.CheckBox { + id: showPreviewsChk + text: i18n("Preview windows on hovering") + + onCheckedChanged: { + plasmoid.configuration.showToolTips = checked; + } + + Component.onCompleted: checked = plasmoid.configuration.showToolTips; + } + + PlasmaComponents.CheckBox { + id: highlightWindowsChk + text: i18n("Highlight windows on hovering") + + onCheckedChanged: { + plasmoid.configuration.highlightWindows = checked; + } + + Component.onCompleted: checked = plasmoid.configuration.highlightWindows; + } + + PlasmaComponents.CheckBox { + id: windowActionsChk + text: i18n("Show window actions in the context menu") + + onCheckedChanged: { + plasmoid.configuration.showWindowActions = checked; + } + + Component.onCompleted: checked = plasmoid.configuration.showWindowActions; + } + + PlasmaComponents.CheckBox { + id: smartLaunchersChk + text: i18n("Show progress information in task buttons") + + onCheckedChanged: { + plasmoid.configuration.smartLaunchersEnabled = checked; + } + + Component.onCompleted: checked = plasmoid.configuration.smartLaunchersEnabled; + } + } } }