Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Side by Side Diff: ui/views/controls/link.cc

Issue 2785973004: Add call to Label::OnNativeThemeChagned() from views::Link (Closed)
Patch Set: Add call to Label::OnNativeThemeChagned() Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 Label::SetFontList(font_list); 160 Label::SetFontList(font_list);
161 RecalculateFont(); 161 RecalculateFont();
162 } 162 }
163 163
164 void Link::SetText(const base::string16& text) { 164 void Link::SetText(const base::string16& text) {
165 Label::SetText(text); 165 Label::SetText(text);
166 ConfigureFocus(); 166 ConfigureFocus();
167 } 167 }
168 168
169 void Link::OnNativeThemeChanged(const ui::NativeTheme* theme) { 169 void Link::OnNativeThemeChanged(const ui::NativeTheme* theme) {
170 Label::OnNativeThemeChanged(theme);
170 Label::SetEnabledColor(GetEnabledColor()); 171 Label::SetEnabledColor(GetEnabledColor());
171 SetDisabledColor( 172 SetDisabledColor(
172 theme->GetSystemColor(ui::NativeTheme::kColorId_LinkDisabled)); 173 theme->GetSystemColor(ui::NativeTheme::kColorId_LinkDisabled));
173 } 174 }
174 175
175 void Link::SetEnabledColor(SkColor color) { 176 void Link::SetEnabledColor(SkColor color) {
176 requested_enabled_color_set_ = true; 177 requested_enabled_color_set_ = true;
177 requested_enabled_color_ = color; 178 requested_enabled_color_ = color;
178 Label::SetEnabledColor(GetEnabledColor()); 179 Label::SetEnabledColor(GetEnabledColor());
179 } 180 }
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 if (GetNativeTheme()) { 248 if (GetNativeTheme()) {
248 return GetNativeTheme()->GetSystemColor( 249 return GetNativeTheme()->GetSystemColor(
249 pressed_ ? ui::NativeTheme::kColorId_LinkPressed 250 pressed_ ? ui::NativeTheme::kColorId_LinkPressed
250 : ui::NativeTheme::kColorId_LinkEnabled); 251 : ui::NativeTheme::kColorId_LinkEnabled);
251 } 252 }
252 253
253 return gfx::kPlaceholderColor; 254 return gfx::kPlaceholderColor;
254 } 255 }
255 256
256 } // namespace views 257 } // namespace views
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698