Commit e7205d03 authored by Tranter Madi's avatar Tranter Madi Committed by Nate Graham

[Kicker] Fix "Tooltip can not be displayed"

Summary:
Display the tooltip with the full label for truncated items

BUG: 390804

Test Plan:
- Tooltip can be display when hovering the mouse on truncated items.
- Other behaviors work normally.

Reviewers: ngraham, hein, #plasma, broulik

Reviewed By: ngraham, hein, #plasma

Subscribers: abetts, ndavis, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D19096
parent fa99dfb2
......@@ -110,6 +110,8 @@ Item {
anchors.fill: parent
active: root.visible && label.truncated
mainItem: toolTipDelegate
onContainsMouseChanged: item.GridView.view.itemContainsMouseChanged(containsMouse)
}
Keys.onPressed: {
......
......@@ -194,6 +194,8 @@ FocusScope {
GridView {
id: gridView
signal itemContainsMouseChanged(bool containsMouse)
property bool usesPlasmaTheme: false
property int iconSize: units.iconSizes.huge
......@@ -285,6 +287,7 @@ FocusScope {
onCurrentIndexChanged: {
if (currentIndex != -1) {
hoverArea.hoverEnabled = false
focus = true;
}
}
......@@ -341,6 +344,21 @@ FocusScope {
itemGrid.keyNavDown();
}
}
onItemContainsMouseChanged: {
if (!containsMouse) {
if (!actionMenu.opened) {
gridView.currentIndex = -1;
}
hoverArea.pressX = -1;
hoverArea.pressY = -1;
hoverArea.lastX = -1;
hoverArea.lastY = -1;
hoverArea.pressedItem = null;
hoverArea.hoverEnabled = true;
}
}
}
}
......@@ -446,20 +464,6 @@ FocusScope {
}
}
}
onContainsMouseChanged: {
if (!containsMouse) {
if (!actionMenu.opened) {
gridView.currentIndex = -1;
}
pressX = -1;
pressY = -1;
lastX = -1;
lastY = -1;
pressedItem = null;
}
}
}
}
}
Markdown is supported
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