mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2025-12-05 22:26:16 +00:00
OSD: use volume-x(volume-3) for 0% volume
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user