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

Unified Diff: ash/system/tray/tray_views.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/tray/tray_views.h ('k') | ui/resources/aura/status_bluetooth_disabled.png » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray/tray_views.cc
diff --git a/ash/system/tray/tray_views.cc b/ash/system/tray/tray_views.cc
index beba70861fdd9bbf7637b945a3be426e94ea5ddc..1c2e75ebdd3a30dfd57d512109a807eb4660facd 100644
--- a/ash/system/tray/tray_views.cc
+++ b/ash/system/tray/tray_views.cc
@@ -276,6 +276,40 @@ void TrayPopupTextButtonContainer::AddTextButton(TrayPopupTextButton* button) {
AddChildView(button);
}
+////////////////////////////////////////////////////////////////////////////////
+// TrayPopupTextButtonContainer
+
+TrayPopupHeaderButton::TrayPopupHeaderButton(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));
+}
+
+TrayPopupHeaderButton::~TrayPopupHeaderButton() {}
+
+gfx::Size TrayPopupHeaderButton::GetPreferredSize() {
+ return gfx::Size(ash::kTrayPopupItemHeight, ash::kTrayPopupItemHeight);
+}
+
+void TrayPopupHeaderButton::OnPaintBorder(gfx::Canvas* canvas) {
+ // Left border.
+ canvas->FillRect(gfx::Rect(0, 0, 1, height()), ash::kBorderDarkColor);
+}
+
+void TrayPopupHeaderButton::StateChanged() {
+ set_background(views::Background::CreateSolidBackground(
+ IsHotTracked() ? ash::kHeaderHoverBackgroundColor :
+ ash::kHeaderBackgroundColor));
+}
views::View* CreateDetailedHeaderEntry(int string_id,
ViewClickListener* listener) {
« no previous file with comments | « ash/system/tray/tray_views.h ('k') | ui/resources/aura/status_bluetooth_disabled.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698