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

Unified Diff: chrome/browser/ui/views/wrench_menu.cc

Issue 12483006: wrench_menu: use NativeTheme colors under aura (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleaned up Created 7 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
Index: chrome/browser/ui/views/wrench_menu.cc
diff --git a/chrome/browser/ui/views/wrench_menu.cc b/chrome/browser/ui/views/wrench_menu.cc
index fce9d4348c6c127a10f190178fec6c43ce386a25..9a0a121aecaccae72dc552ae22c25ca4488d9b17 100644
--- a/chrome/browser/ui/views/wrench_menu.cc
+++ b/chrome/browser/ui/views/wrench_menu.cc
@@ -248,6 +248,37 @@ class MenuButtonBackground : public views::Background {
}
private:
+#if defined(USE_AURA)
Elliot Glaysher 2013/03/18 17:53:40 Please remember that aura is not a linux-only comp
Bobby Powers 2013/03/18 18:11:43 {Unfocused,Focused,Menu}BorderColor were already d
Bobby Powers 2013/03/18 19:59:53 I believe the current patch addresses this correct
+ static SkColor border_color(CustomButton::ButtonState state) {
+ ui::NativeTheme *theme = ui::NativeTheme::instance();
+ switch (state) {
+ case CustomButton::STATE_HOVERED:
+ return theme->GetSystemColor(
+ ui::NativeTheme::kColorId_UnfocusedBorderColor);
+ case CustomButton::STATE_PRESSED:
+ return theme->GetSystemColor(
+ ui::NativeTheme::kColorId_FocusedBorderColor);
+ default:
+ return theme->GetSystemColor(
+ ui::NativeTheme::kColorId_MenuBorderColor);
+ }
+ }
+
+ static SkColor background_color(CustomButton::ButtonState state) {
+ ui::NativeTheme *theme = ui::NativeTheme::instance();
+ switch (state) {
+ case CustomButton::STATE_HOVERED:
+ return theme->GetSystemColor(
+ ui::NativeTheme::kColorId_HotMenuItemBackgroundColor);
+ case CustomButton::STATE_PRESSED:
+ return theme->GetSystemColor(
+ ui::NativeTheme::kColorId_FocusedMenuItemBackgroundColor);
+ default:
+ return theme->GetSystemColor(
+ ui::NativeTheme::kColorId_MenuBackgroundColor);
+ }
+ }
+#else
static SkColor border_color(CustomButton::ButtonState state) {
switch (state) {
case CustomButton::STATE_HOVERED: return kHotBorderColor;
@@ -263,6 +294,7 @@ class MenuButtonBackground : public views::Background {
default: return kBackgroundColor;
}
}
+#endif
static SkColor touch_background_color(CustomButton::ButtonState state) {
switch (state) {

Powered by Google App Engine
This is Rietveld 408576698