diff options
author | yefim@chromium.org <yefim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-20 00:52:29 +0000 |
---|---|---|
committer | yefim@chromium.org <yefim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-20 00:52:29 +0000 |
commit | a673f35eda3aa6859420688dae2e2b08fe126818 (patch) | |
tree | a55b37ba7dfd614d75855bd37f48a67f8d07d76b /ui/native_theme/native_theme.cc | |
parent | 3d95e54652070dacfdb9188c3f6f48111bcc007e (diff) | |
download | chromium_src-a673f35eda3aa6859420688dae2e2b08fe126818.zip chromium_src-a673f35eda3aa6859420688dae2e2b08fe126818.tar.gz chromium_src-a673f35eda3aa6859420688dae2e2b08fe126818.tar.bz2 |
Added flag to enable new menu style.
Changed so far: menu background, no gutter, separator, border with round corners (corners are not transparent yet).
This is work in progress, just want to keep change size manageable.
BUG=157692
Review URL: https://chromiumcodereview.appspot.com/11348055
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168671 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/native_theme/native_theme.cc')
-rw-r--r-- | ui/native_theme/native_theme.cc | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/ui/native_theme/native_theme.cc b/ui/native_theme/native_theme.cc index 85b58e9..6bc7a93 100644 --- a/ui/native_theme/native_theme.cc +++ b/ui/native_theme/native_theme.cc @@ -4,13 +4,10 @@ #include "ui/native_theme/native_theme.h" -namespace ui { +#include "base/command_line.h" +#include "ui/base/ui_base_switches.h" -NativeTheme::NativeTheme() - : thumb_inactive_color_(0xeaeaea), - thumb_active_color_(0xf4f4f4), - track_color_(0xd3d3d3) { -} +namespace ui { void NativeTheme::SetScrollbarColors(unsigned inactive_color, unsigned active_color, @@ -23,4 +20,18 @@ void NativeTheme::SetScrollbarColors(unsigned inactive_color, // NativeTheme::instance() is implemented in the platform specific source files, // such as native_theme_win.cc or native_theme_linux.cc +// static +bool NativeTheme::IsNewMenuStyleEnabled() { + static bool enable_new_menu_style = + CommandLine::ForCurrentProcess()->HasSwitch( + switches::kEnableNewMenuStyle); + return enable_new_menu_style; +} + +NativeTheme::NativeTheme() + : thumb_inactive_color_(0xeaeaea), + thumb_active_color_(0xf4f4f4), + track_color_(0xd3d3d3) { +} + } // namespace ui |