diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-30 20:51:19 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-30 20:51:19 +0000 |
commit | a32bd2113f84e91c5d9d06aae77fae0c2e0dcc9b (patch) | |
tree | c8070d3d1315ddc5ca29de2be6015e811ed50fbf /views/controls/link.cc | |
parent | e27a5f5229ae9c5257569c1c8d0f632c115a5cd7 (diff) | |
download | chromium_src-a32bd2113f84e91c5d9d06aae77fae0c2e0dcc9b.zip chromium_src-a32bd2113f84e91c5d9d06aae77fae0c2e0dcc9b.tar.gz chromium_src-a32bd2113f84e91c5d9d06aae77fae0c2e0dcc9b.tar.bz2 |
Convert Label::GetFont() to unix_hacker style. Original patch by Thiago Farina (see http://codereview.chromium.org/1580002 ), r=me.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/1528009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43136 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls/link.cc')
-rw-r--r-- | views/controls/link.cc | 14 |
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_); } } |