Chromium Code Reviews| Index: ui/views/controls/styled_label.cc |
| diff --git a/ui/views/controls/styled_label.cc b/ui/views/controls/styled_label.cc |
| index 9c09a1eb05a9a17584e05c09d89783c0618b6b12..552e2c92637f76b5d72e2e9248ce658024e860a1 100644 |
| --- a/ui/views/controls/styled_label.cc |
| +++ b/ui/views/controls/styled_label.cc |
| @@ -8,6 +8,8 @@ |
| #include "base/strings/string_util.h" |
| #include "ui/base/text/text_elider.h" |
| +#include "ui/gfx/color_utils.h" |
| +#include "ui/native_theme/native_theme.h" |
| #include "ui/views/controls/label.h" |
| #include "ui/views/controls/link.h" |
| #include "ui/views/controls/styled_label_listener.h" |
| @@ -42,6 +44,8 @@ scoped_ptr<View> CreateLabelRange(const string16& text, |
| result.reset(label); |
| } |
| + result->SetEnabledColor(style_info.color); |
| + |
| if (!style_info.tooltip.empty()) |
| result->SetTooltipText(style_info.tooltip); |
| if (style_info.font_style != gfx::Font::NORMAL) |
| @@ -55,6 +59,8 @@ scoped_ptr<View> CreateLabelRange(const string16& text, |
| StyledLabel::RangeStyleInfo::RangeStyleInfo() |
| : font_style(gfx::Font::NORMAL), |
| + color(ui::NativeTheme::instance()->GetSystemColor( |
| + ui::NativeTheme::kColorId_LabelEnabledColor)), |
| disable_line_wrapping(false), |
| is_link(false) { |
| } |
| @@ -67,6 +73,12 @@ StyledLabel::RangeStyleInfo StyledLabel::RangeStyleInfo::CreateForLink() { |
| result.disable_line_wrapping = true; |
| result.is_link = true; |
| result.font_style = gfx::Font::UNDERLINE; |
| +#if defined(OS_WIN) |
| + result.color = color_utils::GetSysSkColor(COLOR_HOTLIGHT); |
| +#else |
| + // TODO(fdoray): source from theme provider. |
| + result.color = SkColorSetRGB(0, 51, 153); |
|
Roger Tawa OOO till Jul 10th
2013/06/26 15:16:29
When will this get fixed? When you finish the GTK
fdoray
2013/06/26 17:06:38
This is how the default link color is obtained for
Roger Tawa OOO till Jul 10th
2013/06/27 13:34:32
Might want to ask Ben what his plans are. Adding
|
| +#endif |
| return result; |
| } |