diff options
author | msw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-21 19:20:35 +0000 |
---|---|---|
committer | msw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-21 19:20:35 +0000 |
commit | 1c717d9d6834d13e58cc4ed4055be78320e9894e (patch) | |
tree | f8e48dbcc0f71c03db95016aa0edd0012010b585 /ui/native_theme | |
parent | cb761f787429874110909b0ffc09c307edad573a (diff) | |
download | chromium_src-1c717d9d6834d13e58cc4ed4055be78320e9894e.zip chromium_src-1c717d9d6834d13e58cc4ed4055be78320e9894e.tar.gz chromium_src-1c717d9d6834d13e58cc4ed4055be78320e9894e.tar.bz2 |
Fix NativeThemeAura's menu background color.
Fix NativeThemeAura::PaintMenuPopupBackground.
(use kColorId_MenuBackgroundColor, not SK_ColorWHITE)
Make FallbackTheme::GetSystemColor protected.
(base decl in NativeTheme is public...)
BUG=292943
TEST=Chrome/Ash menus look good in normal themes, the Windows "High Contrast Black" theme, and similar inverted color themes.
R=sky@chromium.org
Review URL: https://codereview.chromium.org/29683004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@229880 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/native_theme')
-rw-r--r-- | ui/native_theme/fallback_theme.h | 3 | ||||
-rw-r--r-- | ui/native_theme/native_theme_aura.cc | 11 |
2 files changed, 5 insertions, 9 deletions
diff --git a/ui/native_theme/fallback_theme.h b/ui/native_theme/fallback_theme.h index 2a69936..65eb3bd 100644 --- a/ui/native_theme/fallback_theme.h +++ b/ui/native_theme/fallback_theme.h @@ -16,10 +16,11 @@ class NATIVE_THEME_EXPORT FallbackTheme : public NativeThemeBase { FallbackTheme(); virtual ~FallbackTheme(); - private: + protected: // Overridden from NativeThemeBase: virtual SkColor GetSystemColor(ColorId color_id) const OVERRIDE; + private: DISALLOW_COPY_AND_ASSIGN(FallbackTheme); }; diff --git a/ui/native_theme/native_theme_aura.cc b/ui/native_theme/native_theme_aura.cc index 6cbc255..c4e8724 100644 --- a/ui/native_theme/native_theme_aura.cc +++ b/ui/native_theme/native_theme_aura.cc @@ -15,12 +15,6 @@ #include "ui/gfx/skbitmap_operations.h" #include "ui/native_theme/common_theme.h" -namespace { - -const SkColor kMenuBackgroundColor = SK_ColorWHITE; - -} // namespace - namespace ui { // static @@ -46,11 +40,12 @@ void NativeThemeAura::PaintMenuPopupBackground( SkCanvas* canvas, const gfx::Size& size, const MenuBackgroundExtraParams& menu_background) const { + SkColor color = GetSystemColor(NativeTheme::kColorId_MenuBackgroundColor); if (menu_background.corner_radius > 0) { SkPaint paint; paint.setStyle(SkPaint::kFill_Style); paint.setFlags(SkPaint::kAntiAlias_Flag); - paint.setColor(kMenuBackgroundColor); + paint.setColor(color); gfx::Path path; SkRect rect = SkRect::MakeWH(SkIntToScalar(size.width()), @@ -62,7 +57,7 @@ void NativeThemeAura::PaintMenuPopupBackground( canvas->drawPath(path, paint); } else { - canvas->drawColor(kMenuBackgroundColor, SkXfermode::kSrc_Mode); + canvas->drawColor(color, SkXfermode::kSrc_Mode); } } |