AudioService: this might be it

This commit is contained in:
Ly-sec
2025-11-26 21:10:26 +01:00
parent e2854f2079
commit 8419549183
4 changed files with 151 additions and 144 deletions
+19
View File
@@ -216,6 +216,25 @@ Variants {
if (AudioService.hasInput)
showOSD(OSD.Type.InputVolume);
}
// Refresh OSD when device changes to ensure correct volume is displayed
function onSinkChanged() {
// If volume OSD is currently showing, refresh it to show new device's volume
if (root.currentOSDType === OSD.Type.Volume) {
Qt.callLater(() => {
showOSD(OSD.Type.Volume);
});
}
}
function onSourceChanged() {
// If input volume OSD is currently showing, refresh it to show new device's volume
if (root.currentOSDType === OSD.Type.InputVolume) {
Qt.callLater(() => {
showOSD(OSD.Type.InputVolume);
});
}
}
}
// Brightness monitoring