add systemTray

This commit is contained in:
lucy 2026-05-14 17:40:40 +02:00
commit aa003dfe9a
4 changed files with 55 additions and 4 deletions

View file

@ -9,8 +9,8 @@ WrapperRectangle {
color: Colors.base01
required property int barHeight
property double vertMargin: barHeight / 4 - 4
property PwNode defaultAudio: Pipewire.ready ? Pipewire.defaultAudioSink : null
property string status: defaultAudio.audio.muted? "mut " : "vol "
property PwNode defaultAudio: Pipewire.ready ? Pipewire.preferredDefaultAudioSink : null
property string status: defaultAudio?.audio.muted ? "mut " : "vol "
topMargin: vertMargin
bottomMargin: vertMargin
leftMargin: 8
@ -19,7 +19,7 @@ WrapperRectangle {
objects: [Pipewire.ready ? Pipewire.defaultAudioSink : null]
}
child: StyledText {
text: root.status + Math.floor(root.defaultAudio.audio.volume * 100) + "%"
opacity: root.defaultAudio.audio.muted ? 0.6 : 1.0
text: root.status + Math.floor(root.defaultAudio?.audio.volume * 100) + "%"
opacity: root.defaultAudio?.audio.muted ? 0.6 : 1.0
}
}