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 e6cac94..0000000 Binary files a/shell/resources/mask.png and /dev/null differ diff --git a/shell/resources/volume/microphone-full.svg b/shell/resources/volume/microphone-full.svg deleted file mode 100644 index 8d1a116..0000000 --- a/shell/resources/volume/microphone-full.svg +++ /dev/null @@ -1,2 +0,0 @@ - - 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"; } }