[gnome-control-center/benzea/fix-volume-icon: 2/3] sound: Include zero volume in lowest volume icon




commit 4b8ff9f6f3a7cc775376a39a89f526f4d4772fd0
Author: Benjamin Berg <bberg redhat com>
Date:   Sat Feb 20 19:43:52 2021 +0100

    sound: Include zero volume in lowest volume icon
    
    If changed externally at least, the volume can be zero while unmuted.
    Just use the lowest volume icon in that case by including it in the
    range.
    
    It does not make sense to use the muted icon, as we are not technically
    muted and the toggle button is not active.

 panels/sound/cc-volume-slider.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/panels/sound/cc-volume-slider.c b/panels/sound/cc-volume-slider.c
index 49b5b8290..5329e4a82 100644
--- a/panels/sound/cc-volume-slider.c
+++ b/panels/sound/cc-volume-slider.c
@@ -53,7 +53,7 @@ update_volume_icon (CcVolumeSlider *self)
 
   if (gtk_toggle_button_get_active (self->mute_button))
     icon_name = "audio-volume-muted-symbolic";
-  else if (fraction > 0.0 && fraction < 30.0)
+  else if (fraction < 30.0)
     icon_name = "audio-volume-low-symbolic";
   else if (fraction > 30.0 && fraction < 70.0)
     icon_name = "audio-volume-medium-symbolic";


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]