OSD: use volume-x(volume-3) for 0% volume

This commit is contained in:
Ly-sec
2025-11-26 15:07:19 +01:00
parent 94d1d9dc9c
commit f611e3a2c0
3 changed files with 5 additions and 4 deletions

View File

@@ -92,6 +92,7 @@ Singleton {
"microphone": "microphone",
"microphone-mute": "microphone-off",
"volume-mute": "volume-off",
"volume-x": "volume-3",
"volume-zero": "volume-3",
"volume-low": "volume-2",
"volume-high": "volume",

View File

@@ -49,9 +49,9 @@ Variants {
case OSD.Type.Volume:
if (isMuted)
return "volume-mute";
// Show muted icon when volume is effectively 0% (within rounding threshold)
// Show volume-x icon when volume is effectively 0% (within rounding threshold)
if (currentVolume < 0.005)
return "volume-mute";
return "volume-x";
return currentVolume <= 0.5 ? "volume-low" : "volume-high";
case OSD.Type.InputVolume:
return isInputMuted ? "microphone-off" : "microphone";

View File

@@ -206,9 +206,9 @@ Singleton {
const maxVolume = Settings.data.audio.volumeOverdrive ? 1.5 : 1.0;
const clampedVolume = Math.max(0, Math.min(volume, maxVolume));
// Show muted icon when volume is effectively 0% (within rounding threshold)
// Show volume-x icon when volume is effectively 0% (within rounding threshold)
if (clampedVolume < 0.005)
return "volume-mute";
return "volume-x";
if (clampedVolume <= 0.5)
return "volume-low";
return "volume-high";