From 83d7dc47c432e69aa962646b1181e691bbd2ef01 Mon Sep 17 00:00:00 2001 From: kossLAN Date: Mon, 3 Nov 2025 18:00:43 -0500 Subject: [PATCH] update volume icons --- shell/bar/volume/VolumeCard.qml | 2 +- shell/bar/volume/VolumeIndicator.qml | 55 ++++++++++----------- shell/resources/mask.png | Bin 1156 -> 0 bytes shell/resources/volume/microphone-full.svg | 2 - shell/resources/volume/microphone-mute.svg | 2 - shell/resources/volume/volume-full.svg | 9 ---- shell/resources/volume/volume-low.svg | 9 ---- shell/resources/volume/volume-mute.svg | 9 ---- shell/resources/volume/volume-off.svg | 9 ---- shell/volosd/Controller.qml | 14 +++--- 10 files changed, 34 insertions(+), 77 deletions(-) delete mode 100644 shell/resources/mask.png delete mode 100644 shell/resources/volume/microphone-full.svg delete mode 100644 shell/resources/volume/microphone-mute.svg delete mode 100644 shell/resources/volume/volume-full.svg delete mode 100644 shell/resources/volume/volume-low.svg delete mode 100644 shell/resources/volume/volume-mute.svg delete mode 100644 shell/resources/volume/volume-off.svg diff --git a/shell/bar/volume/VolumeCard.qml b/shell/bar/volume/VolumeCard.qml index 56c3e26..9a47ba4 100644 --- a/shell/bar/volume/VolumeCard.qml +++ b/shell/bar/volume/VolumeCard.qml @@ -12,7 +12,7 @@ Loader { active: node != null required property PwNode node - property string label: node.nickname ?? node.name + property string label: node.nickname === "" ? node.description : node.nickname property Component leftWidget diff --git a/shell/bar/volume/VolumeIndicator.qml b/shell/bar/volume/VolumeIndicator.qml index 886a10a..f4b6785 100644 --- a/shell/bar/volume/VolumeIndicator.qml +++ b/shell/bar/volume/VolumeIndicator.qml @@ -7,7 +7,6 @@ import Quickshell.Widgets import Quickshell.Services.Pipewire import qs.widgets import qs.bar -import qs StyledMouseArea { id: root @@ -15,14 +14,19 @@ StyledMouseArea { required property var bar property bool showMenu: false + property PwNode sink: Pipewire.defaultAudioSink IconImage { id: icon - source: "root:resources/volume/volume-full.svg" - - anchors { - fill: parent - margins: 2 + anchors.fill: parent + source: if (root.sink.audio.muted) { + return "image://icon/audio-volume-muted"; + } else if (root.sink.audio.volume > 0.66) { + return "image://icon/audio-volume-high"; + } else if (root.sink.audio.volume > 0.33) { + return "image://icon/audio-volume-medium"; + } else { + return "image://icon/audio-volume-low"; } } @@ -33,25 +37,24 @@ StyledMouseArea { show: root.showMenu onClosed: root.showMenu = false - implicitWidth: 300 + implicitWidth: 275 implicitHeight: container.implicitHeight + (2 * 8) - property PwNode sink: Pipewire.defaultAudioSink - property real entryHeight: 45 + property real entryHeight: 40 ColumnLayout { id: container - spacing: 4 + spacing: 2 anchors { fill: parent - margins: 8 + margins: 4 } // Default Audio VolumeCard { id: defaultCard - node: menu.sink + node: root.sink Layout.fillWidth: true Layout.preferredHeight: menu.entryHeight @@ -60,37 +63,29 @@ StyledMouseArea { IconImage { anchors.fill: parent - source: { - if (defaultCard.node.audio.muted) { - return "root:resources/volume/volume-mute.svg"; - } else { - return "root:resources/volume/volume-full.svg"; - } + source: if (root.sink.audio.muted) { + return "image://icon/audio-volume-muted"; + } else if (root.sink.audio.volume > 0.66) { + return "image://icon/audio-volume-high"; + } else if (root.sink.audio.volume > 0.33) { + return "image://icon/audio-volume-medium"; + } else { + return "image://icon/audio-volume-low"; } } } } - Rectangle { - visible: linkTracker.linkGroups.length !== 0 - color: ShellSettings.colors.active_translucent - radius: height / 2 - Layout.leftMargin: 3 - Layout.rightMargin: 3 - Layout.fillWidth: true - Layout.preferredHeight: 2 - } - // Application Mixer PwNodeLinkTracker { id: linkTracker - node: menu.sink + node: root.sink } StyledListView { id: appList visible: linkTracker.linkGroups.length !== 0 - spacing: 6 + spacing: 2 model: linkTracker.linkGroups clip: true diff --git a/shell/resources/mask.png b/shell/resources/mask.png deleted file mode 100644 index e6cac946fb0e3fbf29d343d07799c4a950079a55..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1156 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANNf&6&>50iMpz3I#>^X_+~x z3=A3*YbV-z9Cna78ZVsf8YS~a;n9SJRySQ;WwJ%P0u--st+kpF^NZD2$Fr+@@q?&> z56K%}J$STcb@OTkj=F{&+dvrNltyuIV?^3eV+}vTFM&34j1n0mt9`U)N%g6)QcbU zO&VwVUy_#9Eo0%yVHUqG>wA}3ue@R5@>xk*>r^g@bh$qG+p|xTpXVOa-_>#XZ)@k+ zF+{%7s%4guVMdIlB$^PrO*PCgRYeyAlVq&Me$FhvC*n_VkV7@*g-q zht{p|`tq3P+{0=H8~2Sd4A&kBTwBQgdiAE8VS)eoY7UCXJyKJf&h22%m*7605GCR;N4JP6$M?ubF#Dydyv#oT8eCEU3`TggPI z;Ol zoZd0rEP4u`Y%hbv(d<13CEhJ_&g=A=XBkw51LgysnB*-e*f&<&iRe|3=AVDEuCjL z-S95Yf};%27QbD);X-?_rrGa9N4D$O1Qyj!EH|#`6yGr~d#@-1Z_SaVAsb?EvflPS zn(iC3e+Tn5<%cZyp3gqLGyh}@>%2!v5)yuybG?o+SKf=)va)5|sc2+Ydnfn$lFw$fKl1-=>KI=2E>o4T_HScg PU|{fc^>bP0l+XkK7 - diff --git a/shell/resources/volume/microphone-mute.svg b/shell/resources/volume/microphone-mute.svg deleted file mode 100644 index 8c2d3b5..0000000 --- a/shell/resources/volume/microphone-mute.svg +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/shell/resources/volume/volume-full.svg b/shell/resources/volume/volume-full.svg deleted file mode 100644 index 19bbfb1..0000000 --- a/shell/resources/volume/volume-full.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/shell/resources/volume/volume-low.svg b/shell/resources/volume/volume-low.svg deleted file mode 100644 index 69e95e5..0000000 --- a/shell/resources/volume/volume-low.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/shell/resources/volume/volume-mute.svg b/shell/resources/volume/volume-mute.svg deleted file mode 100644 index 4b67e0c..0000000 --- a/shell/resources/volume/volume-mute.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/shell/resources/volume/volume-off.svg b/shell/resources/volume/volume-off.svg deleted file mode 100644 index f975a8b..0000000 --- a/shell/resources/volume/volume-off.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/shell/volosd/Controller.qml b/shell/volosd/Controller.qml index 0d7f825..2b7f45e 100644 --- a/shell/volosd/Controller.qml +++ b/shell/volosd/Controller.qml @@ -67,12 +67,14 @@ Scope { IconImage { implicitSize: 30 - source: { - if (Pipewire.defaultAudioSink?.audio.muted) { - return "root:resources/volume/volume-mute.svg"; - } else { - return "root:resources/volume/volume-full.svg"; - } + source: if (Pipewire.defaultAudioSink?.audio.muted) { + return "image://icon/audio-volume-muted"; + } else if (Pipewire.defaultAudioSink?.audio.volume > 0.66) { + return "image://icon/audio-volume-high"; + } else if (Pipewire.defaultAudioSink?.audio.volume > 0.33) { + return "image://icon/audio-volume-medium"; + } else { + return "image://icon/audio-volume-low"; } }