mirror of
https://github.com/KDE/latte-dock.git
synced 2024-12-23 13:33:50 +03:00
tasks:restore previews window functionality
--various improvements/fixes for previews and highlight windows in new plasmoid architecture. All tasks settings are now stored in applet level and not in containment level BUG:420692
This commit is contained in:
parent
97e7c428b7
commit
3018bd0fff
@ -58,21 +58,15 @@
|
||||
<entry name="transparentPanel" type="Bool">
|
||||
<default>false</default>
|
||||
</entry>
|
||||
<entry name="highlightWindows" type="Bool">
|
||||
<default>false</default>
|
||||
</entry>
|
||||
<entry name="isInLatteDock" type="Bool">
|
||||
<default>false</default>
|
||||
</entry>
|
||||
<entry name="showToolTips" type="Bool">
|
||||
<default>false</default>
|
||||
</entry>
|
||||
<entry name="durationTime" type="Int">
|
||||
<default>2</default>
|
||||
<default>1</default>
|
||||
</entry>
|
||||
<entry name="previewsDelay" type="Int">
|
||||
<label>Delay in order to show previews or highlight windows. Values lower than 150ms are ignored because previews do not work correctly</label>
|
||||
<default>600</default>
|
||||
<default>300</default>
|
||||
</entry>
|
||||
<entry name="forceMonochromaticIcons" type="Bool">
|
||||
<default>false</default>
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user