Chromium Code Reviews| Index: ui/views/controls/link.cc |
| diff --git a/ui/views/controls/link.cc b/ui/views/controls/link.cc |
| index 04c83ac3af628bce83147af1514656a4ca576ae8..1397e38471db0f34dd187d06fef5ae69b5d1a17f 100644 |
| --- a/ui/views/controls/link.cc |
| +++ b/ui/views/controls/link.cc |
| @@ -204,13 +204,11 @@ void Link::SetPressed(bool pressed) { |
| } |
| void Link::RecalculateFont() { |
| - // The font should be underlined iff the link is enabled and |underline_| is |
| - // true. |
| - if ((enabled() && underline_) == |
| - !(font().GetStyle() & gfx::Font::UNDERLINED)) { |
| + // Set an underline iff the link is enabled and |underline_| is true. |
| + if ((enabled() && underline_) != (font().GetStyle() & gfx::Font::UNDERLINE)) { |
|
Alexei Svitkine (slow)
2013/01/22 19:20:21
This is not correct.
The result of (font().GetSty
msw
2013/01/22 22:27:24
Adjusted, thanks for the catch (worked trivially i
|
| Label::SetFont(font().DeriveFont(0, enabled() && underline_ ? |
| - (font().GetStyle() | gfx::Font::UNDERLINED) : |
| - (font().GetStyle() & ~gfx::Font::UNDERLINED))); |
| + (font().GetStyle() | gfx::Font::UNDERLINE) : |
| + (font().GetStyle() & ~gfx::Font::UNDERLINE))); |
| } |
| } |