forked from Shinonome/dots-hyprland
fix console warnings for osds
This commit is contained in:
@@ -29,7 +29,7 @@ Scope {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: Brightness
|
target: Brightness ?? null
|
||||||
function onValueChanged() {
|
function onValueChanged() {
|
||||||
if (!Brightness.ready) return
|
if (!Brightness.ready) return
|
||||||
root.triggerOsd()
|
root.triggerOsd()
|
||||||
@@ -37,7 +37,7 @@ Scope {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: Audio.sink?.audio
|
target: Audio.sink?.audio ?? null
|
||||||
function onVolumeChanged() {
|
function onVolumeChanged() {
|
||||||
if (!Audio.ready) return
|
if (!Audio.ready) return
|
||||||
root.showOsdValues = false
|
root.showOsdValues = false
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ Scope {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: Audio.sink?.audio
|
target: Audio.sink?.audio ?? null
|
||||||
function onVolumeChanged() {
|
function onVolumeChanged() {
|
||||||
if (!Audio.ready) return
|
if (!Audio.ready) return
|
||||||
root.triggerOsd()
|
root.triggerOsd()
|
||||||
@@ -37,7 +37,7 @@ Scope {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: Brightness
|
target: Brightness ?? null
|
||||||
function onValueChanged() {
|
function onValueChanged() {
|
||||||
if (!Brightness.ready) return
|
if (!Brightness.ready) return
|
||||||
root.showOsdValues = false
|
root.showOsdValues = false
|
||||||
@@ -96,7 +96,7 @@ Scope {
|
|||||||
OsdValueIndicator {
|
OsdValueIndicator {
|
||||||
id: osdValues
|
id: osdValues
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
value: Audio.sink?.audio.volume
|
value: Audio.sink?.audio.volume ?? 0
|
||||||
icon: "volume_up"
|
icon: "volume_up"
|
||||||
name: qsTr("Volume")
|
name: qsTr("Volume")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ pragma ComponentBehavior: Bound
|
|||||||
Singleton {
|
Singleton {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
property bool ready: Pipewire.defaultAudioSink?.ready
|
property bool ready: Pipewire.defaultAudioSink?.ready ?? false
|
||||||
property var sink: Pipewire.defaultAudioSink
|
property var sink: Pipewire.defaultAudioSink
|
||||||
property var source: Pipewire.defaultAudioSource
|
property var source: Pipewire.defaultAudioSource
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user