44 lines
1.2 KiB
QML
44 lines
1.2 KiB
QML
import Quickshell
|
|
import Quickshell.Io
|
|
import QtQuick
|
|
import QtQuick.Layouts
|
|
import Quickshell.Widgets
|
|
import Quickshell.Services.Pipewire
|
|
|
|
Item {
|
|
id: root
|
|
property PwNode speakerNode: Pipewire.defaultAudioSink
|
|
property PwNode microphoneNode: Pipewire.defaultAudioSource
|
|
PwObjectTracker { objects: [ root.microphoneNode, root.speakerNode ] }
|
|
|
|
width: row.width
|
|
height: row.height
|
|
|
|
// console.log("a");
|
|
|
|
RowLayout {
|
|
id: row
|
|
Item {
|
|
implicitWidth: 28
|
|
implicitHeight: 28
|
|
Rectangle {
|
|
width: parent.width
|
|
height: parent.height
|
|
radius: 7
|
|
color: "black"
|
|
}
|
|
IconImage {
|
|
anchors.centerIn: parent
|
|
implicitSize: 25
|
|
source: root.speakerNode.audio.muted ? "root:/assets/bar/MutedSpeaker.svg" : "root:/assets/bar/Speaker.svg"
|
|
// source: "root:/assets/bar/Speaker.svg"
|
|
}
|
|
}
|
|
IconImage {
|
|
implicitSize: 25
|
|
source: root.microphoneNode.audio.muted ? "root:/assets/bar/MutedMic.svg" : "root:/assets/bar/Mic.svg"
|
|
// source: "root:/assets/bar/Mic.svg"
|
|
}
|
|
}
|
|
}
|