| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "views/controls/link.h" | 5 #include "views/controls/link.h" |
| 6 | 6 |
| 7 #if defined(OS_LINUX) | 7 #if defined(OS_LINUX) |
| 8 #include <gdk/gdk.h> | 8 #include <gdk/gdk.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 void Link::SetHighlighted(bool f) { | 204 void Link::SetHighlighted(bool f) { |
| 205 if (f != highlighted_) { | 205 if (f != highlighted_) { |
| 206 highlighted_ = f; | 206 highlighted_ = f; |
| 207 ValidateStyle(); | 207 ValidateStyle(); |
| 208 SchedulePaint(); | 208 SchedulePaint(); |
| 209 } | 209 } |
| 210 } | 210 } |
| 211 | 211 |
| 212 void Link::ValidateStyle() { | 212 void Link::ValidateStyle() { |
| 213 if (enabled_) { | 213 if (enabled_) { |
| 214 if (!(font().style() & gfx::Font::UNDERLINED)) { | 214 if (!(font().GetStyle() & gfx::Font::UNDERLINED)) { |
| 215 Label::SetFont( | 215 Label::SetFont( |
| 216 font().DeriveFont(0, font().style() | gfx::Font::UNDERLINED)); | 216 font().DeriveFont(0, font().GetStyle() | gfx::Font::UNDERLINED)); |
| 217 } | 217 } |
| 218 Label::SetColor(highlighted_ ? highlighted_color_ : normal_color_); | 218 Label::SetColor(highlighted_ ? highlighted_color_ : normal_color_); |
| 219 } else { | 219 } else { |
| 220 if (font().style() & gfx::Font::UNDERLINED) { | 220 if (font().GetStyle() & gfx::Font::UNDERLINED) { |
| 221 Label::SetFont( | 221 Label::SetFont( |
| 222 font().DeriveFont(0, font().style() & ~gfx::Font::UNDERLINED)); | 222 font().DeriveFont(0, font().GetStyle() & ~gfx::Font::UNDERLINED)); |
| 223 } | 223 } |
| 224 Label::SetColor(disabled_color_); | 224 Label::SetColor(disabled_color_); |
| 225 } | 225 } |
| 226 } | 226 } |
| 227 | 227 |
| 228 } // namespace views | 228 } // namespace views |
| OLD | NEW |