add tooltips

This commit is contained in:
Damocles 2026-04-12 00:49:58 +02:00
parent 7ca7e1e952
commit 6370732e4e
15 changed files with 123 additions and 1 deletions

View file

@ -1,4 +1,5 @@
import QtQuick
import QtQuick.Controls
import Quickshell.Services.Mpris
import "." as M
@ -19,6 +20,20 @@ Row {
anchors.verticalCenter: parent.verticalCenter
}
HoverHandler { id: hover }
ToolTip {
visible: hover.hovered
text: {
const p = root.player;
if (!p) return "";
const parts = [];
if (p.trackTitle) parts.push(p.trackTitle);
if (p.trackArtists?.length) parts.push(p.trackArtists.join(", "));
if (p.trackAlbum) parts.push(p.trackAlbum);
return parts.join("\n") || p.identity;
}
}
TapHandler {
onTapped: root.player?.togglePlaying()
}