| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/views/controls/link.h" | 5 #include "ui/views/controls/link.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| 11 #include "ui/base/accessibility/accessible_view_state.h" | 11 #include "ui/base/accessibility/accessible_view_state.h" |
| 12 #include "ui/base/event.h" | 12 #include "ui/base/events/event.h" |
| 13 #include "ui/base/keycodes/keyboard_codes.h" | 13 #include "ui/base/keycodes/keyboard_codes.h" |
| 14 #include "ui/gfx/color_utils.h" | 14 #include "ui/gfx/color_utils.h" |
| 15 #include "ui/gfx/font.h" | 15 #include "ui/gfx/font.h" |
| 16 #include "ui/views/controls/link_listener.h" | 16 #include "ui/views/controls/link_listener.h" |
| 17 | 17 |
| 18 #if defined(USE_AURA) | 18 #if defined(USE_AURA) |
| 19 #include "ui/base/cursor/cursor.h" | 19 #include "ui/base/cursor/cursor.h" |
| 20 #endif | 20 #endif |
| 21 | 21 |
| 22 namespace views { | 22 namespace views { |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 void Link::RecalculateFont() { | 198 void Link::RecalculateFont() { |
| 199 // The font should be underlined iff the link is enabled. | 199 // The font should be underlined iff the link is enabled. |
| 200 if (enabled() == !(font().GetStyle() & gfx::Font::UNDERLINED)) { | 200 if (enabled() == !(font().GetStyle() & gfx::Font::UNDERLINED)) { |
| 201 Label::SetFont(font().DeriveFont(0, enabled() ? | 201 Label::SetFont(font().DeriveFont(0, enabled() ? |
| 202 (font().GetStyle() | gfx::Font::UNDERLINED) : | 202 (font().GetStyle() | gfx::Font::UNDERLINED) : |
| 203 (font().GetStyle() & ~gfx::Font::UNDERLINED))); | 203 (font().GetStyle() & ~gfx::Font::UNDERLINED))); |
| 204 } | 204 } |
| 205 } | 205 } |
| 206 | 206 |
| 207 } // namespace views | 207 } // namespace views |
| OLD | NEW |