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

Unified Diff: ash/system/network/tray_network.cc

Issue 10041041: ash: Make the rows in IME and bluetooth tray-popups larger. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 8 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 | « ash/system/ime/tray_ime.cc ('k') | ash/system/tray/tray_views.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/network/tray_network.cc
diff --git a/ash/system/network/tray_network.cc b/ash/system/network/tray_network.cc
index 8f9be34c854da255d251fd71863919e7cedef8ef..41f5826f64205672e11292bf19ab1d0888eb295f 100644
--- a/ash/system/network/tray_network.cc
+++ b/ash/system/network/tray_network.cc
@@ -86,48 +86,6 @@ class NonActivatableSettingsBubble : public views::BubbleDelegateView {
DISALLOW_COPY_AND_ASSIGN(NonActivatableSettingsBubble);
};
-// A ToggleImageButton with fixed size, paddings and hover effects. These
-// buttons are used in the header.
-class HeaderButton : public views::ToggleImageButton {
- public:
- HeaderButton(views::ButtonListener* listener,
- int enabled_resource_id,
- int disabled_resource_id)
- : views::ToggleImageButton(listener) {
- ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
- SetImage(views::CustomButton::BS_NORMAL,
- bundle.GetImageNamed(enabled_resource_id).ToSkBitmap());
- SetToggledImage(views::CustomButton::BS_NORMAL,
- bundle.GetImageNamed(disabled_resource_id).ToSkBitmap());
- SetImageAlignment(views::ImageButton::ALIGN_CENTER,
- views::ImageButton::ALIGN_MIDDLE);
- set_background(views::Background::CreateSolidBackground(
- ash::kHeaderBackgroundColor));
- }
-
- virtual ~HeaderButton() {}
-
- private:
- // Overridden from views::View.
- virtual gfx::Size GetPreferredSize() OVERRIDE {
- return gfx::Size(ash::kTrayPopupItemHeight, ash::kTrayPopupItemHeight);
- }
-
- virtual void OnPaintBorder(gfx::Canvas* canvas) OVERRIDE {
- // Left border.
- canvas->FillRect(gfx::Rect(0, 0, 1, height()), ash::kBorderDarkColor);
- }
-
- // Overridden from views::CustomButton.
- virtual void StateChanged() OVERRIDE {
- set_background(views::Background::CreateSolidBackground(
- IsHotTracked() ? ash::kHeaderHoverBackgroundColor :
- ash::kHeaderBackgroundColor));
- }
-
- DISALLOW_COPY_AND_ASSIGN(HeaderButton);
-};
-
} // namespace
namespace ash {
@@ -275,21 +233,21 @@ class NetworkDetailedView : public views::View,
header_buttons_->SetLayoutManager(new
views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0, 0));
- button_wifi_ = new HeaderButton(this,
+ button_wifi_ = new TrayPopupHeaderButton(this,
IDR_AURA_UBER_TRAY_WIFI_ENABLED,
IDR_AURA_UBER_TRAY_WIFI_DISABLED);
button_wifi_->SetToggled(!delegate->GetWifiEnabled());
header_buttons_->AddChildView(button_wifi_);
if (delegate->GetCellularAvailable()) {
- button_cellular_ = new HeaderButton(this,
+ button_cellular_ = new TrayPopupHeaderButton(this,
IDR_AURA_UBER_TRAY_CELLULAR_ENABLED,
IDR_AURA_UBER_TRAY_CELLULAR_DISABLED);
button_cellular_->SetToggled(!delegate->GetCellularEnabled());
header_buttons_->AddChildView(button_cellular_);
}
- info_icon_ = new HeaderButton(this,
+ info_icon_ = new TrayPopupHeaderButton(this,
IDR_AURA_UBER_TRAY_NETWORK_INFO,
IDR_AURA_UBER_TRAY_NETWORK_INFO);
header_buttons_->AddChildView(info_icon_);
« no previous file with comments | « ash/system/ime/tray_ime.cc ('k') | ash/system/tray/tray_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698