Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 1 addition & 18 deletions frame/qml/PanelToolTip.qml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,7 @@ Item {
}
}

Timer {
id: toolTipShowTimer
interval: 50
onTriggered: {
showToolTip()
}
}

function showToolTip()
function open()
{
var window = Panel.toolTipWindow
if (!window)
Expand All @@ -50,18 +42,9 @@ Item {
window.show()
toolTip.open()
}

function open()
{
toolTipShowTimer.start();
}

function close()
{
if (toolTipShowTimer.running) {
toolTipShowTimer.stop()
}

var window = Panel.toolTipWindow
if (!window)
return
Expand Down
19 changes: 15 additions & 4 deletions panels/dock/launcherItem/package/launcheritem.qml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,16 @@ AppletItem {
// 9:14 (iconSize/dockHeight)
icon.height: Dock.MAX_DOCK_TASKMANAGER_ICON_SIZE
icon.width: Dock.MAX_DOCK_TASKMANAGER_ICON_SIZE
Timer {
id: toolTipShowTimer
interval: 50
onTriggered: {
var point = Applet.rootObject.mapToItem(null, Applet.rootObject.width / 2, 0)
toolTip.toolTipX = point.x
toolTip.toolTipY = point.y
toolTip.open()
}
}
onClicked: {
Applet.toggleLauncher()
toolTip.close()
Expand All @@ -74,11 +84,12 @@ AppletItem {
onYChanged: updateLaunchpadPos()
onHoveredChanged: {
if (hovered) {
var point = Applet.rootObject.mapToItem(null, Applet.rootObject.width / 2, 0)
toolTip.toolTipX = point.x
toolTip.toolTipY = point.y
toolTip.open()
toolTipShowTimer.start()
} else {
if (toolTipShowTimer.running) {
toolTipShowTimer.stop()
}

toolTip.close()
}
}
Expand Down
19 changes: 15 additions & 4 deletions panels/dock/multitaskview/package/multitaskview.qml
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,28 @@ AppletItem {
// 9:14 (iconSize/dockHeight)
icon.height: Dock.MAX_DOCK_TASKMANAGER_ICON_SIZE
icon.width: Dock.MAX_DOCK_TASKMANAGER_ICON_SIZE
Timer {
id: toolTipShowTimer
interval: 50
onTriggered: {
var point = Applet.rootObject.mapToItem(null, Applet.rootObject.width / 2, 0)
toolTip.toolTipX = point.x
toolTip.toolTipY = point.y
toolTip.open()
}
}
onClicked: {
Applet.openWorkspace()
toolTip.close()
}
onHoveredChanged: {
if (hovered) {
var point = Applet.rootObject.mapToItem(null, Applet.rootObject.width / 2, 0)
toolTip.toolTipX = point.x
toolTip.toolTipY = point.y
toolTip.open()
toolTipShowTimer.start()
} else {
if (toolTipShowTimer.running) {
toolTipShowTimer.stop()
}

toolTip.close()
}
}
Expand Down
20 changes: 16 additions & 4 deletions panels/dock/taskmanager/package/AppItem.qml
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,7 @@ Item {

onEntered: {
if (windows.length === 0) {
var point = root.mapToItem(null, root.width / 2, 0)
toolTip.toolTipX = point.x
toolTip.toolTipY = point.y
toolTip.open()
toolTipShowTimer.start()
return
}

Expand All @@ -264,6 +261,10 @@ Item {
}

onExited: {
if (toolTipShowTimer.running) {
toolTipShowTimer.stop()
}

if (windows.length === 0) {
toolTip.close()
return
Expand All @@ -276,6 +277,17 @@ Item {
text: root.name
}

Timer {
id: toolTipShowTimer
interval: 50
onTriggered: {
var point = root.mapToItem(null, root.width / 2, 0)
toolTip.toolTipX = point.x
toolTip.toolTipY = point.y
toolTip.open()
}
}

function closeItemPreview() {
if (previewTimer.running) {
previewTimer.stop()
Expand Down