diff options
author | motek@chromium.org <motek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-28 22:21:44 +0000 |
---|---|---|
committer | motek@chromium.org <motek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-28 22:21:44 +0000 |
commit | 86d54bf69a45e36d7dba8eced629082c90d2fab6 (patch) | |
tree | 3a5fb8062bbd710fcc6be1ce783b78130481b6ee /views | |
parent | fc65f27a303dab4b3219839eab29c39c1499d783 (diff) | |
download | chromium_src-86d54bf69a45e36d7dba8eced629082c90d2fab6.zip chromium_src-86d54bf69a45e36d7dba8eced629082c90d2fab6.tar.gz chromium_src-86d54bf69a45e36d7dba8eced629082c90d2fab6.tar.bz2 |
Corrects setting default text colors on Windows.
BUG=86979
Review URL: http://codereview.chromium.org/7276040
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90849 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r-- | views/controls/button/text_button.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/views/controls/button/text_button.cc b/views/controls/button/text_button.cc index 5ad963b..bb9defc 100644 --- a/views/controls/button/text_button.cc +++ b/views/controls/button/text_button.cc @@ -17,6 +17,7 @@ #include "views/widget/widget.h" #if defined(OS_WIN) +#include "skia/ext/skia_utils_win.h" #include "ui/gfx/native_theme_win.h" #include "ui/gfx/platform_font_win.h" #endif @@ -785,6 +786,13 @@ NativeTextButton::NativeTextButton(ButtonListener* listener, } void NativeTextButton::Init() { +#if defined(OS_WIN) + // Windows will like to show its own colors. + // Halos and such are ignored as they are always set by specific calls. + color_enabled_ = skia::COLORREFToSkColor(GetSysColor(COLOR_BTNTEXT)); + color_disabled_ = skia::COLORREFToSkColor(GetSysColor(COLOR_GRAYTEXT)); + color_hover_ = color_ = color_enabled_; +#endif set_border(new TextButtonNativeThemeBorder(this)); set_ignore_minimum_size(false); set_alignment(ALIGN_CENTER); |