dedup, monospace font for icons

This commit is contained in:
Damocles 2026-04-11 00:35:37 +02:00
parent cd45c2d9cf
commit 00838e1d64
18 changed files with 67 additions and 80 deletions

View file

@ -14,24 +14,16 @@ Row {
readonly property real volume: sink?.audio?.volume ?? 0
readonly property bool muted: sink?.audio?.muted ?? false
Text {
text: root.muted ? "" : (root.volume > 0.5 ? "" : (root.volume > 0 ? "" : ""))
color: M.Theme.base05
font.pixelSize: M.Theme.fontSize + 1
font.family: M.Theme.fontFamily
M.BarIcon {
icon: root.muted ? "" : (root.volume > 0.5 ? "" : (root.volume > 0 ? "" : ""))
anchors.verticalCenter: parent.verticalCenter
}
Text {
text: Math.round(root.volume * 100) + "%"
color: M.Theme.base05
font.pixelSize: M.Theme.fontSize
font.family: M.Theme.fontFamily
M.BarLabel {
label: Math.round(root.volume * 100) + "%"
anchors.verticalCenter: parent.verticalCenter
}
TapHandler {
onTapped: if (root.sink?.audio)
root.sink.audio.muted = !root.sink.audio.muted
onTapped: if (root.sink?.audio) root.sink.audio.muted = !root.sink.audio.muted
}
}