mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
AudioPanel: suppress OSD when toggle mute/unmute to prevent overlapping
This commit is contained in:
+7
-2
@@ -206,6 +206,8 @@ Variants {
|
||||
}
|
||||
|
||||
function onMutedChanged() {
|
||||
if (AudioService.consumeOutputOSDSuppression())
|
||||
return;
|
||||
showOSD(OSD.Type.Volume);
|
||||
}
|
||||
|
||||
@@ -215,8 +217,11 @@ Variants {
|
||||
}
|
||||
|
||||
function onInputMutedChanged() {
|
||||
if (AudioService.hasInput)
|
||||
showOSD(OSD.Type.InputVolume);
|
||||
if (!AudioService.hasInput)
|
||||
return;
|
||||
if (AudioService.consumeInputOSDSuppression())
|
||||
return;
|
||||
showOSD(OSD.Type.InputVolume);
|
||||
}
|
||||
|
||||
// Refresh OSD when device changes to ensure correct volume is displayed
|
||||
|
||||
@@ -157,6 +157,7 @@ SmartPanel {
|
||||
tooltipText: I18n.tr("tooltips.output-muted")
|
||||
baseSize: Style.baseWidgetSize * 0.8
|
||||
onClicked: {
|
||||
AudioService.suppressOutputOSD();
|
||||
AudioService.setOutputMuted(!AudioService.muted);
|
||||
}
|
||||
}
|
||||
@@ -166,6 +167,7 @@ SmartPanel {
|
||||
tooltipText: I18n.tr("tooltips.input-muted")
|
||||
baseSize: Style.baseWidgetSize * 0.8
|
||||
onClicked: {
|
||||
AudioService.suppressInputOSD();
|
||||
AudioService.setInputMuted(!AudioService.inputMuted);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user