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

Unified Diff: ui/views/controls/styled_label.cc

Issue 1451933005: Use correct native theme for StyledLabel labels and links. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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/views/controls/styled_label.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/styled_label.cc
diff --git a/ui/views/controls/styled_label.cc b/ui/views/controls/styled_label.cc
index 66a820f04f52a7bda44895e38f07c452bc3d1135..91eb933222de2d90462e967132a0251f702630b5 100644
--- a/ui/views/controls/styled_label.cc
+++ b/ui/views/controls/styled_label.cc
@@ -46,7 +46,8 @@ scoped_ptr<Label> CreateLabelRange(
result.reset(new Label(text));
}
- result->SetEnabledColor(style_info.color);
+ if (style_info.color != SK_ColorTRANSPARENT)
+ result->SetEnabledColor(style_info.color);
result->SetFontList(font_list);
if (!style_info.tooltip.empty())
@@ -66,8 +67,7 @@ scoped_ptr<Label> CreateLabelRange(
StyledLabel::RangeStyleInfo::RangeStyleInfo()
: font_style(gfx::Font::NORMAL),
- color(ui::NativeTheme::instance()->GetSystemColor(
- ui::NativeTheme::kColorId_LabelEnabledColor)),
+ color(SK_ColorTRANSPARENT),
disable_line_wrapping(false),
is_link(false) {}
@@ -78,8 +78,6 @@ StyledLabel::RangeStyleInfo StyledLabel::RangeStyleInfo::CreateForLink() {
RangeStyleInfo result;
result.disable_line_wrapping = true;
result.is_link = true;
- result.color = ui::NativeTheme::instance()->GetSystemColor(
- ui::NativeTheme::kColorId_LinkEnabled);
return result;
}
« no previous file with comments | « ui/views/controls/styled_label.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698