summaryrefslogtreecommitdiffstats
path: root/views/controls/link.cc
diff options
context:
space:
mode:
Diffstat (limited to 'views/controls/link.cc')
-rw-r--r--views/controls/link.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/views/controls/link.cc b/views/controls/link.cc
index bf90fea..083870c 100644
--- a/views/controls/link.cc
+++ b/views/controls/link.cc
@@ -217,15 +217,17 @@ void Link::SetHighlighted(bool f) {
}
void Link::ValidateStyle() {
- gfx::Font font = GetFont();
-
if (enabled_) {
- if ((font.style() & gfx::Font::UNDERLINED) == 0)
- Label::SetFont(font.DeriveFont(0, font.style() | gfx::Font::UNDERLINED));
+ if (!(font().style() & gfx::Font::UNDERLINED)) {
+ Label::SetFont(
+ font().DeriveFont(0, font().style() | gfx::Font::UNDERLINED));
+ }
Label::SetColor(highlighted_ ? highlighted_color_ : normal_color_);
} else {
- if ((font.style() & gfx::Font::UNDERLINED) != 0)
- Label::SetFont(font.DeriveFont(0, font.style() & ~gfx::Font::UNDERLINED));
+ if (font().style() & gfx::Font::UNDERLINED) {
+ Label::SetFont(
+ font().DeriveFont(0, font().style() & ~gfx::Font::UNDERLINED));
+ }
Label::SetColor(disabled_color_);
}
}