Commit 3296b46d authored by Bharadwaj Raju's avatar Bharadwaj Raju 📚 Committed by Nate Graham
Browse files

[applets/taskmanager] Make highlight windows highlight only on tooltip hover

Only highlights windows when the tooltip is hovered, not the icon in the task
manager. Previous behaviour was distracting because every time the mouse moved
over the task manager area you would start getting translucent window previews.
parent e399041e
......@@ -76,8 +76,8 @@
<default>true</default>
</entry>
<entry name="highlightWindows" type="Bool">
<label>Whether to request the window manager highlight windows when hovering corresponding task buttons.</label>
<default>false</default>
<label>Whether to request the window manager highlight windows when hovering corresponding task tooltips.</label>
<default>true</default>
</entry>
<entry name="launchers" type="StringList">
<label>The list of launcher tasks on the widget. Usually .desktop file or executable URLs. Special URLs such as preferred://browser that expand to default applications are supported.</label>
......
......@@ -48,10 +48,16 @@ Item {
Kirigami.FormData.label: i18n ("General:")
text: i18n("Show tooltips")
}
CheckBox {
id: highlightWindows
text: i18n("Highlight windows when hovering over tasks")
RowLayout {
// HACK: Workaround for Kirigami bug 434625
// due to which a simple Layout.leftMargin on CheckBox doesn't work
Item { implicitWidth: Kirigami.Units.gridUnit }
CheckBox {
id: highlightWindows
text: i18n("Highlight windows when hovering over task tooltips")
enabled: showToolTips.checked
}
}
CheckBox {
......
......@@ -74,6 +74,11 @@ MouseArea {
readonly property bool highlighted: (inPopup && activeFocus) || (!inPopup && containsMouse)
|| (task.contextMenu && task.contextMenu.status === PlasmaComponents.DialogStatus.Open)
|| (groupDialog.visible && groupDialog.visualParent === task)
onHighlightedChanged: {
// ensure it doesn't get stuck with a window highlighted
backend.cancelHighlightWindows();
}
function showToolTip() {
toolTipArea.showToolTip();
......@@ -128,10 +133,6 @@ MouseArea {
} else {
pressed = false;
}
if (model.IsWindow === true) {
tasks.windowsHovered(model.WinIdList, containsMouse);
}
}
onPressed: {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment