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

Unified Diff: ui/views/controls/button/blue_button.cc

Issue 288983010: fix text color of BlueButton on GTK-theme-mode Linux Aura. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add colors to common theme Created 6 years, 6 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 | « ui/native_theme/native_theme.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/button/blue_button.cc
diff --git a/ui/views/controls/button/blue_button.cc b/ui/views/controls/button/blue_button.cc
index ddf7e37b99e3371f4530c72edfdf3fbe245d1ea5..8efb0bdc0709c669383105c40598a855a497d5c1 100644
--- a/ui/views/controls/button/blue_button.cc
+++ b/ui/views/controls/button/blue_button.cc
@@ -11,8 +11,7 @@
namespace {
-// Default text and shadow colors for the blue button.
-const SkColor kBlueButtonTextColor = SK_ColorWHITE;
+// Default shadow color for the blue button.
const SkColor kBlueButtonShadowColor = SkColorSetRGB(0x53, 0x8C, 0xEA);
} // namespace
@@ -34,8 +33,16 @@ BlueButton::~BlueButton() {}
void BlueButton::ResetColorsFromNativeTheme() {
LabelButton::ResetColorsFromNativeTheme();
if (!gfx::IsInvertedColorScheme()) {
- for (size_t state = STATE_NORMAL; state < STATE_COUNT; ++state)
- SetTextColor(static_cast<ButtonState>(state), kBlueButtonTextColor);
+ SetTextColor(STATE_NORMAL, GetNativeTheme()->
+ GetSystemColor(ui::NativeTheme::kColorId_BlueButtonEnabledColor));
+ SetTextColor(STATE_HOVERED, GetNativeTheme()->
+ GetSystemColor(ui::NativeTheme::kColorId_BlueButtonHoverColor));
+ SetTextColor(STATE_PRESSED, GetNativeTheme()->
+ GetSystemColor(ui::NativeTheme::kColorId_BlueButtonHighlightColor));
+ SetTextColor(STATE_DISABLED, GetNativeTheme()->
+ GetSystemColor(ui::NativeTheme::kColorId_BlueButtonDisabledColor));
+
+ // TODO(estade): this is not great on system themes.
label()->SetShadowColors(kBlueButtonShadowColor, kBlueButtonShadowColor);
label()->SetShadowOffset(0, 1);
}
« no previous file with comments | « ui/native_theme/native_theme.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698