diff options
Diffstat (limited to 'chrome')
6 files changed, 15 insertions, 4 deletions
diff --git a/chrome/browser/chromeos/status/clock_menu_button.h b/chrome/browser/chromeos/status/clock_menu_button.h index 405d00a..76f214a 100644 --- a/chrome/browser/chromeos/status/clock_menu_button.h +++ b/chrome/browser/chromeos/status/clock_menu_button.h @@ -59,6 +59,9 @@ class ClockMenuButton : public StatusAreaButton, // changes. void UpdateText(); + protected: + virtual int horizontal_padding() { return 3; } + private: // views::ViewMenuDelegate implementation. virtual void RunMenu(views::View* source, const gfx::Point& pt); diff --git a/chrome/browser/chromeos/status/input_method_menu_button.cc b/chrome/browser/chromeos/status/input_method_menu_button.cc index f2a7d2e..cd99210 100644 --- a/chrome/browser/chromeos/status/input_method_menu_button.cc +++ b/chrome/browser/chromeos/status/input_method_menu_button.cc @@ -42,7 +42,7 @@ InputMethodMenuButton::InputMethodMenuButton(StatusAreaHost* host) set_border(NULL); set_use_menu_button_paint(true); SetFont(ResourceBundle::GetSharedInstance().GetFont( - ResourceBundle::BaseFont).DeriveFont(1, gfx::Font::BOLD)); + ResourceBundle::BaseFont).DeriveFont(1)); SetEnabledColor(0xB3FFFFFF); // White with 70% Alpha SetDisabledColor(0x00FFFFFF); // White with 00% Alpha (invisible) SetShowMultipleIconStates(false); diff --git a/chrome/browser/chromeos/status/network_menu_button.cc b/chrome/browser/chromeos/status/network_menu_button.cc index 6492e0a..48b5187 100644 --- a/chrome/browser/chromeos/status/network_menu_button.cc +++ b/chrome/browser/chromeos/status/network_menu_button.cc @@ -68,7 +68,8 @@ void NetworkMenuButton::AnimationProgressed(const Animation* animation) { // NetworkMenuButton, StatusAreaButton implementation: void NetworkMenuButton::DrawIcon(gfx::Canvas* canvas) { - canvas->DrawBitmapInt(IconForDisplay(icon(), badge()), 0, 0); + canvas->DrawBitmapInt(IconForDisplay(icon(), badge()), + horizontal_padding(), 0); } //////////////////////////////////////////////////////////////////////////////// diff --git a/chrome/browser/chromeos/status/status_area_button.cc b/chrome/browser/chromeos/status/status_area_button.cc index b35d043..eb6c2d5 100644 --- a/chrome/browser/chromeos/status/status_area_button.cc +++ b/chrome/browser/chromeos/status/status_area_button.cc @@ -59,6 +59,9 @@ gfx::Size StatusAreaButton::GetPreferredSize() { } } + // Add padding. + prefsize.Enlarge(2 * horizontal_padding(), 0); + return prefsize; } @@ -75,7 +78,7 @@ void StatusAreaButton::SetText(const std::wstring& text) { } void StatusAreaButton::DrawIcon(gfx::Canvas* canvas) { - canvas->DrawBitmapInt(icon(), 0, 0); + canvas->DrawBitmapInt(icon(), horizontal_padding(), 0); } } // namespace chromeos diff --git a/chrome/browser/chromeos/status/status_area_button.h b/chrome/browser/chromeos/status/status_area_button.h index d65cd53..cefc474 100644 --- a/chrome/browser/chromeos/status/status_area_button.h +++ b/chrome/browser/chromeos/status/status_area_button.h @@ -39,6 +39,10 @@ class StatusAreaButton : public views::MenuButton { virtual int icon_height() { return 24; } virtual int icon_width() { return 23; } + // Subclasses can override this method to return more or less padding. + // The padding is added to both the left and right side. + virtual int horizontal_padding() { return 1; } + // True if the button wants to use views::MenuButton drawings. bool use_menu_button_paint_; diff --git a/chrome/browser/chromeos/status/status_area_view.cc b/chrome/browser/chromeos/status/status_area_view.cc index 44be530..6a89d42 100644 --- a/chrome/browser/chromeos/status/status_area_view.cc +++ b/chrome/browser/chromeos/status/status_area_view.cc @@ -17,7 +17,7 @@ namespace chromeos { // Number of pixels to separate each icon. -const int kSeparation = 3; +const int kSeparation = 1; StatusAreaView::StatusAreaView(StatusAreaHost* host) : host_(host), |