From f62ab85a19858b4480650e06dc48cdd6c646108e Mon Sep 17 00:00:00 2001 From: Fengzi <41763546+F-fengzi@users.noreply.github.com> Date: Thu, 4 Dec 2025 15:37:52 -0500 Subject: [PATCH] audio: protection: fix weird volume limit behavior --- dots/.config/quickshell/ii/services/Audio.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dots/.config/quickshell/ii/services/Audio.qml b/dots/.config/quickshell/ii/services/Audio.qml index 33c49cc30..d4bfa5932 100644 --- a/dots/.config/quickshell/ii/services/Audio.qml +++ b/dots/.config/quickshell/ii/services/Audio.qml @@ -111,9 +111,9 @@ Singleton { if (newVolume - lastVolume > maxAllowedIncrease) { sink.audio.volume = lastVolume; root.sinkProtectionTriggered(Translation.tr("Illegal increment")); - } else if (newVolume > maxAllowed || newVolume > root.hardMaxValue) { + } else if (Math.round(newVolume * 100) / 100 > maxAllowed || newVolume > root.hardMaxValue) { root.sinkProtectionTriggered(Translation.tr("Exceeded max allowed")); - sink.audio.volume = Math.min(lastVolume, maxAllowed); + sink.audio.volume = maxAllowed; } lastVolume = sink.audio.volume; }