linux_aura: Fix drawing of the bookmark bubble in High Contrast Inverse.
We weren't updating colors correctly in the bubble, and were hardcoding
the button colors in a way that we shouldn't on Linux.
BUG=350144, 350498
[email protected], [email protected]
Review URL: https://codereview.chromium.org/191493003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256040 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/ui/views/controls/button/label_button.cc b/ui/views/controls/button/label_button.cc
index 7d87af4d..0cfd1a4 100644
--- a/ui/views/controls/button/label_button.cc
+++ b/ui/views/controls/button/label_button.cc
@@ -26,9 +26,11 @@
// The spacing between the icon and text.
const int kSpacing = 5;
+#if !(defined(OS_LINUX) && !defined(OS_CHROMEOS))
// Default text and shadow colors for STYLE_BUTTON.
const SkColor kStyleButtonTextColor = SK_ColorBLACK;
const SkColor kStyleButtonShadowColor = SK_ColorWHITE;
+#endif
} // namespace
@@ -315,14 +317,20 @@
label_->SetAutoColorReadabilityEnabled(true);
label_->ClearEmbellishing();
} else if (style() == STYLE_BUTTON) {
+ // TODO(erg): This is disabled on desktop linux because of the binary asset
+ // confusion. These details should either be pushed into ui::NativeThemeWin
+ // or should be obsoleted by rendering buttons with paint calls instead of
+ // with static assets. http://crbug.com/350498
+#if !(defined(OS_LINUX) && !defined(OS_CHROMEOS))
constant_text_color = true;
colors[STATE_NORMAL] = kStyleButtonTextColor;
label_->SetBackgroundColor(theme->GetSystemColor(
ui::NativeTheme::kColorId_ButtonBackgroundColor));
- label_->set_background(NULL);
label_->SetAutoColorReadabilityEnabled(false);
label_->SetShadowColors(kStyleButtonShadowColor, kStyleButtonShadowColor);
label_->SetShadowOffset(0, 1);
+#endif
+ label_->set_background(NULL);
} else {
label_->set_background(NULL);
}