mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
Brightness/VolumeWidget: fix visual issues (#875)
This commit is contained in:
@@ -202,9 +202,14 @@ Singleton {
|
||||
function getOutputIcon() {
|
||||
if (muted)
|
||||
return "volume-mute";
|
||||
if (volume <= Number.EPSILON)
|
||||
|
||||
const maxVolume = Settings.data.audio.volumeOverdrive ? 1.5 : 1.0;
|
||||
const clampedVolume = Math.max(0, Math.min(volume, maxVolume));
|
||||
const displayPercent = Math.round(clampedVolume * 100);
|
||||
|
||||
if (displayPercent === 0)
|
||||
return "volume-zero";
|
||||
if (volume <= 0.5)
|
||||
if (clampedVolume <= 0.5)
|
||||
return "volume-low";
|
||||
return "volume-high";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user