Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Unified Diff: ash/system/audio/tray_volume.cc

Issue 9706007: ash: Update the volume icon when audio is muted/unmuted. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/audio/tray_volume.cc
diff --git a/ash/system/audio/tray_volume.cc b/ash/system/audio/tray_volume.cc
index 5a8e856e27b80aab79fd18f9455043be7e847d3f..45d1d1d72f8ab5e01aaec12ac95d25af4258779e 100644
--- a/ash/system/audio/tray_volume.cc
+++ b/ash/system/audio/tray_volume.cc
@@ -115,6 +115,10 @@ class VolumeView : public views::View,
void SetVolumeLevel(float percent) {
slider_->SetValue(percent);
+ // It is possible that the volume was (un)muted, but the actual volume level
+ // did not change. In that case, setting the value of the slider won't
+ // trigger a repaint. So explicitly trigger a repaint.
+ icon_->SchedulePaint();
}
private:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698