summaryrefslogtreecommitdiffstats
path: root/ash/system/audio
diff options
context:
space:
mode:
authorsadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-23 15:08:21 +0000
committersadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-23 15:08:21 +0000
commite22206c5ff30133913e3773a83fc67f24819d02b (patch)
tree7ca3a7aa47753eeaa77972aa69d1a2a807b0c141 /ash/system/audio
parent61ab21a7cc04d00e258fc9caf491e12d6f0569f5 (diff)
downloadchromium_src-e22206c5ff30133913e3773a83fc67f24819d02b.zip
chromium_src-e22206c5ff30133913e3773a83fc67f24819d02b.tar.gz
chromium_src-e22206c5ff30133913e3773a83fc67f24819d02b.tar.bz2
ash: Fix various UI issues.
* Show integer battery power. * Hide the user name, since we can't yet get the full name of the user. * Refresh profile pic/avatar immediately after it is changed. * New assets BUG=119623, 119596, 119573 TEST=none Review URL: https://chromiumcodereview.appspot.com/9839011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128490 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/system/audio')
-rw-r--r--ash/system/audio/tray_volume.cc14
1 files changed, 11 insertions, 3 deletions
diff --git a/ash/system/audio/tray_volume.cc b/ash/system/audio/tray_volume.cc
index e02fd1a..4fdc77e 100644
--- a/ash/system/audio/tray_volume.cc
+++ b/ash/system/audio/tray_volume.cc
@@ -27,9 +27,9 @@ namespace ash {
namespace internal {
namespace {
-const int kVolumeImageWidth = 44;
-const int kVolumeImageHeight = 44;
-const int kVolumeLevel = 5;
+const int kVolumeImageWidth = 25;
+const int kVolumeImageHeight = 25;
+const int kVolumeLevel = 4;
}
namespace tray {
@@ -39,8 +39,10 @@ class VolumeButton : public views::ToggleImageButton {
explicit VolumeButton(views::ButtonListener* listener)
: views::ToggleImageButton(listener),
image_index_(-1) {
+ SetImageAlignment(ALIGN_CENTER, ALIGN_MIDDLE);
image_ = ui::ResourceBundle::GetSharedInstance().GetImageNamed(
IDR_AURA_UBER_TRAY_VOLUME_LEVELS);
+ SetPreferredSize(gfx::Size(kTrayPopupItemHeight, kTrayPopupItemHeight));
Update();
}
@@ -70,6 +72,12 @@ class VolumeButton : public views::ToggleImageButton {
private:
// Overridden from views::View.
+ virtual gfx::Size GetPreferredSize() OVERRIDE {
+ gfx::Size size = views::ToggleImageButton::GetPreferredSize();
+ size.set_height(kTrayPopupItemHeight);
+ return size;
+ }
+
virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE {
views::ToggleImageButton::OnPaint(canvas);