From ba063e2405e8e7779c9e222375ab16e7df78be4b Mon Sep 17 00:00:00 2001 From: Mengci Cai Date: Wed, 4 Feb 2026 17:07:29 +0800 Subject: [PATCH] fix: return mute icon for silent audio Updated the logic in the AudioApplet to correctly identify and display the mute icon when the volume level is less than or equal to 1. Previously, the code failed to explicitly handle the state where volume was 0 or very low, potentially resulting in incorrect icon rendering or undefined behavior. The change adds an else block to return "osd_volume_mute" in these cases, ensuring accurate UI feedback for users. Log: Fixed the audio OSD mute icon display for silent state Influence: 1. Test volume at 0% to ensure the mute icon is displayed 2. Test volume between 1% and 66% to ensure the low/mid volume icon is displayed 3. Test volume above 66% to ensure the high volume icon is displayed 4. Verify icon switching behavior when sliding the volume slider pms: BUG-349767 --- panels/notification/osd/audio/audioapplet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panels/notification/osd/audio/audioapplet.cpp b/panels/notification/osd/audio/audioapplet.cpp index 81acf6d77..4105e2709 100644 --- a/panels/notification/osd/audio/audioapplet.cpp +++ b/panels/notification/osd/audio/audioapplet.cpp @@ -75,7 +75,7 @@ QString AudioApplet::fetchIconName() const const double volume = m_volumeValue; - QString level = "0"; + QString level = "mute"; if (volume > 0 && volume <= 0.33) level = "33"; else if (volume > 0.33 && volume <= 0.66)