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.Pipewire
import "." as M
@ -23,6 +24,14 @@ Row {
anchors.verticalCenter: parent.verticalCenter
}
HoverHandler { id: hover }
ToolTip {
visible: hover.hovered
text: (root.sink?.description ?? root.sink?.name ?? "Unknown sink") +
"\nVolume: " + Math.round(root.volume * 100) + "%" +
(root.muted ? "\nMuted" : "")
}
TapHandler {
onTapped: if (root.sink?.audio) root.sink.audio.muted = !root.sink.audio.muted
}