diff options
author | Hui Wang <hui.wang@canonical.com> | 2022-01-04 16:17:28 +0800 |
---|---|---|
committer | Robert Ancell <robert.ancell@canonical.com> | 2022-01-31 12:25:38 +1300 |
commit | 3d23aa2d133a11a944ecb73293828fefe0335575 (patch) | |
tree | d436cf581db41b641c28c82484ea6754dadb34f8 | |
parent | 740959f1616acfaff3ca8c7f4377f387297c6657 (diff) | |
download | gnome-control-center-3d23aa2d133a11a944ecb73293828fefe0335575.tar.gz |
sound: clear the value on level_bar when stream is empty
We met an Input Device level_bar display issue on a machine which has
no internal mic. At first there is no external mic plugged, so the
Input Device list is empty and level_bar is gray color, after we plug
an external mic, the level_bar has red color ripples, then we unplug
the external mic, the Input Device list changes to empty and we
expect the level_bar changes back to gray color, but some bars are
still red color.
Here clear the self->value to 0 if the stream is empty, then the
level_bar will change back to gray color when Input/Output device
list is empty.
Signed-off-by: Hui Wang <hui.wang@canonical.com>
-rw-r--r-- | panels/sound/cc-level-bar.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/panels/sound/cc-level-bar.c b/panels/sound/cc-level-bar.c index 8d8b2c9c9..4a71968ea 100644 --- a/panels/sound/cc-level-bar.c +++ b/panels/sound/cc-level-bar.c @@ -232,6 +232,7 @@ cc_level_bar_set_stream (CcLevelBar *self, if (stream == NULL) { + self->value = 0.0; gtk_widget_queue_draw (GTK_WIDGET (self)); return; } |