diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-18 12:55:15 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-18 12:55:15 +0200 |
| commit | d02e7cc23b7e1ecebf321b176c189369ef9f38c4 (patch) | |
| tree | fde99649217d98cd124712cb43d77f0ca41d141a /desktop/modules/sound/Osd.qml | |
| parent | 25e33522a74d9ffb71e399d9060d9fdef42e792d (diff) | |
| download | quickshell-d02e7cc23b7e1ecebf321b176c189369ef9f38c4.tar.gz quickshell-d02e7cc23b7e1ecebf321b176c189369ef9f38c4.zip | |
feat(sound): show the active device name in the volume OSD
The OSD showed only "Output"/"Input", not which device was in use, so
switching between, say, the analogue output and a USB DAC gave no
visible confirmation beyond the volume itself.
The name falls back description -> nickname -> name, the same order
SoundPage.devLabel uses, and elides. The panel height grows to fit the
new line.
Diffstat (limited to 'desktop/modules/sound/Osd.qml')
| -rw-r--r-- | desktop/modules/sound/Osd.qml | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/desktop/modules/sound/Osd.qml b/desktop/modules/sound/Osd.qml index 424b9c3..49a977b 100644 --- a/desktop/modules/sound/Osd.qml +++ b/desktop/modules/sound/Osd.qml @@ -60,9 +60,9 @@ Scope { anchors.bottom: true margins.bottom: 120 - // Grows to fit the track row; the volume-only size is unchanged. + // Grows to fit the track row and the device line. implicitWidth: 360 - implicitHeight: Player.active ? 150 : 72 + implicitHeight: Player.active ? 178 : 100 color: "transparent" exclusionMode: ExclusionMode.Ignore @@ -165,6 +165,16 @@ Scope { Behavior on width { NumberAnimation { duration: 100 } } } } + + // The device the active node represents. Same fallback + // order as SoundPage.devLabel. + Text { + width: parent.width + elide: Text.ElideRight + text: win.node?.description || win.node?.nickname || win.node?.name || "" + font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 2 } + color: Theme.subtext + } } } } |
