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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 #elif defined(OS_LINUX) | 172 #elif defined(OS_LINUX) |
173 return gdk_cursor_new(GDK_HAND2); | 173 return gdk_cursor_new(GDK_HAND2); |
174 #endif | 174 #endif |
175 } | 175 } |
176 | 176 |
177 std::string Link::GetClassName() const { | 177 std::string Link::GetClassName() const { |
178 return kViewClassName; | 178 return kViewClassName; |
179 } | 179 } |
180 | 180 |
181 void Link::SetHighlightedColor(const SkColor& color) { | 181 void Link::SetHighlightedColor(const SkColor& color) { |
182 normal_color_ = color; | 182 highlighted_color_ = color; |
183 ValidateStyle(); | 183 ValidateStyle(); |
184 } | 184 } |
185 | 185 |
186 void Link::SetDisabledColor(const SkColor& color) { | 186 void Link::SetDisabledColor(const SkColor& color) { |
187 disabled_color_ = color; | 187 disabled_color_ = color; |
188 ValidateStyle(); | 188 ValidateStyle(); |
189 } | 189 } |
190 | 190 |
191 void Link::SetNormalColor(const SkColor& color) { | 191 void Link::SetNormalColor(const SkColor& color) { |
192 normal_color_ = color; | 192 normal_color_ = color; |
(...skipping 23 matching lines...) Expand all Loading... |
216 } else { | 216 } else { |
217 if (font().GetStyle() & gfx::Font::UNDERLINED) { | 217 if (font().GetStyle() & gfx::Font::UNDERLINED) { |
218 Label::SetFont( | 218 Label::SetFont( |
219 font().DeriveFont(0, font().GetStyle() & ~gfx::Font::UNDERLINED)); | 219 font().DeriveFont(0, font().GetStyle() & ~gfx::Font::UNDERLINED)); |
220 } | 220 } |
221 Label::SetColor(disabled_color_); | 221 Label::SetColor(disabled_color_); |
222 } | 222 } |
223 } | 223 } |
224 | 224 |
225 } // namespace views | 225 } // namespace views |
OLD | NEW |