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

Unified Diff: ui/views/style/typography_provider.cc

Issue 2910153002: Remove views::Label::SetDisabledColor(). Replace with typography colors. (Closed)
Patch Set: rebase for r476345 Created 3 years, 7 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
« ui/views/controls/label.h ('K') | « ui/views/style/typography_provider.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/style/typography_provider.cc
diff --git a/ui/views/style/typography_provider.cc b/ui/views/style/typography_provider.cc
index ab46a0a9302cd072ba81234fc1e0eeda4ec4be09..11bce4e92bc6465d84020f90d904fa30116c4e60 100644
--- a/ui/views/style/typography_provider.cc
+++ b/ui/views/style/typography_provider.cc
@@ -7,6 +7,7 @@
#include "base/logging.h"
#include "ui/base/default_style.h"
#include "ui/base/resource/resource_bundle.h"
+#include "ui/native_theme/native_theme.h"
#include "ui/views/style/typography.h"
using gfx::Font;
@@ -47,8 +48,14 @@ const gfx::FontList& DefaultTypographyProvider::GetFont(int context,
size_delta, Font::NORMAL, font_weight);
}
-SkColor DefaultTypographyProvider::GetColor(int context, int style) const {
- return SK_ColorBLACK;
+SkColor DefaultTypographyProvider::GetColor(
+ int context,
+ int style,
+ const ui::NativeTheme& theme) const {
+ return theme.GetSystemColor(
+ (style == style::STYLE_DISABLED)
+ ? ui::NativeTheme::kColorId_LabelDisabledColor
+ : ui::NativeTheme::kColorId_LabelEnabledColor);
}
int DefaultTypographyProvider::GetLineHeight(int context, int style) const {
« ui/views/controls/label.h ('K') | « ui/views/style/typography_provider.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698