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

Unified Diff: ui/views/style/typography.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
Index: ui/views/style/typography.cc
diff --git a/ui/views/style/typography.cc b/ui/views/style/typography.cc
index 034d56da29063b6bfd1a8b9ebfe50864d814b493..a9ad8ac6cf845ebebad36b1d5283eaefb4a66d8e 100644
--- a/ui/views/style/typography.cc
+++ b/ui/views/style/typography.cc
@@ -5,6 +5,7 @@
#include "ui/views/style/typography.h"
#include "base/logging.h"
+#include "ui/native_theme/native_theme.h"
#include "ui/views/layout/layout_provider.h"
#include "ui/views/style/typography_provider.h"
@@ -26,10 +27,13 @@ const gfx::FontList& GetFont(int text_context, int text_style) {
text_style);
}
-SkColor GetColor(int text_context, int text_style) {
+SkColor GetColor(int text_context,
+ int text_style,
+ const ui::NativeTheme* theme) {
ValidateContextAndStyle(text_context, text_style);
- return LayoutProvider::Get()->GetTypographyProvider().GetColor(text_context,
- text_style);
+ DCHECK(theme);
+ return LayoutProvider::Get()->GetTypographyProvider().GetColor(
+ text_context, text_style, *theme);
}
int GetLineHeight(int text_context, int text_style) {

Powered by Google App Engine
This is Rietveld 408576698