1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-08-07 22:18:30 -04:00

audio: only show mic volume OSD through DMS IPCs, not external source

changes
fixes #2790
port 1.5

(cherry picked from commit 05feb211ba)
This commit is contained in:
bbedward
2026-07-10 12:43:07 -04:00
committed by dms-ci[bot]
parent f7d8e2b56c
commit 554e55c63a
3 changed files with 13 additions and 2 deletions
@@ -255,6 +255,7 @@ BasePill {
const newVolume = delta > 0 ? Math.min(100, currentVolume + step) : Math.max(0, currentVolume - step); const newVolume = delta > 0 ? Math.min(100, currentVolume + step) : Math.max(0, currentVolume - step);
AudioService.source.audio.muted = false; AudioService.source.audio.muted = false;
AudioService.source.audio.volume = newVolume / 100; AudioService.source.audio.volume = newVolume / 100;
AudioService.micVolumeChanged();
} }
function handleBrightnessWheel(delta) { function handleBrightnessWheel(delta) {
+8 -2
View File
@@ -23,10 +23,10 @@ DankOSD {
Connections { Connections {
target: AudioService.source?.audio ?? null target: AudioService.source?.audio ?? null
// Sync only - apps adjusting mic gain (WebRTC AGC etc.) fire this
// constantly, so external volume changes must not surface the OSD
function onVolumeChanged() { function onVolumeChanged() {
root._syncVolume(); root._syncVolume();
if (SettingsData.osdMicVolumeEnabled)
root.show();
} }
function onMutedChanged() { function onMutedChanged() {
@@ -38,6 +38,12 @@ DankOSD {
Connections { Connections {
target: AudioService target: AudioService
function onMicVolumeChanged() {
root._syncVolume();
if (SettingsData.osdMicVolumeEnabled)
root.show();
}
function onSourceChanged() { function onSourceChanged() {
root._syncVolume(); root._syncVolume();
if (root.shouldBeVisible && SettingsData.osdMicVolumeEnabled) if (root.shouldBeVisible && SettingsData.osdMicVolumeEnabled)
+4
View File
@@ -61,6 +61,7 @@ Singleton {
readonly property int wheelVolumeStep: SettingsData.audioWheelScrollAmount readonly property int wheelVolumeStep: SettingsData.audioWheelScrollAmount
signal micMuteChanged signal micMuteChanged
signal micVolumeChanged
signal audioOutputCycled(string deviceName, string deviceIcon) signal audioOutputCycled(string deviceName, string deviceIcon)
signal deviceAliasChanged(string nodeName, string newAlias) signal deviceAliasChanged(string nodeName, string newAlias)
signal wireplumberReloadStarted signal wireplumberReloadStarted
@@ -905,6 +906,7 @@ EOFCONFIG
const clampedVolume = Math.max(0, Math.min(100, percentage)); const clampedVolume = Math.max(0, Math.min(100, percentage));
root.source.audio.volume = clampedVolume / 100; root.source.audio.volume = clampedVolume / 100;
micVolumeChanged();
return `Microphone volume set to ${clampedVolume}%`; return `Microphone volume set to ${clampedVolume}%`;
} }
@@ -929,6 +931,7 @@ EOFCONFIG
const newVolume = Math.max(0, Math.min(100, currentVolume + stepValue)); const newVolume = Math.max(0, Math.min(100, currentVolume + stepValue));
root.source.audio.volume = newVolume / 100; root.source.audio.volume = newVolume / 100;
micVolumeChanged();
return `Microphone volume increased to ${newVolume}%`; return `Microphone volume increased to ${newVolume}%`;
} }
@@ -944,6 +947,7 @@ EOFCONFIG
const newVolume = Math.max(0, Math.min(100, currentVolume - stepValue)); const newVolume = Math.max(0, Math.min(100, currentVolume - stepValue));
root.source.audio.volume = newVolume / 100; root.source.audio.volume = newVolume / 100;
micVolumeChanged();
return `Microphone volume decreased to ${newVolume}%`; return `Microphone volume decreased to ${newVolume}%`;
} }