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

Side by Side Diff: ui/views/controls/button/text_button.cc

Issue 258063009: retry r266622: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: revert Label changes completely Created 6 years, 7 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 | Annotate | Revision Log
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/button/text_button.h" 5 #include "ui/views/controls/button/text_button.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "grit/ui_resources.h" 10 #include "grit/ui_resources.h"
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 max_width_(0), 200 max_width_(0),
201 show_multiple_icon_states_(true), 201 show_multiple_icon_states_(true),
202 is_default_(false), 202 is_default_(false),
203 multi_line_(false), 203 multi_line_(false),
204 use_enabled_color_from_theme_(true), 204 use_enabled_color_from_theme_(true),
205 use_disabled_color_from_theme_(true), 205 use_disabled_color_from_theme_(true),
206 use_highlight_color_from_theme_(true), 206 use_highlight_color_from_theme_(true),
207 use_hover_color_from_theme_(true), 207 use_hover_color_from_theme_(true),
208 focus_painter_(Painter::CreateDashedFocusPainter()) { 208 focus_painter_(Painter::CreateDashedFocusPainter()) {
209 SetText(text); 209 SetText(text);
210 // OnNativeThemeChanged sets the color member variables.
211 TextButtonBase::OnNativeThemeChanged(GetNativeTheme());
212 SetAnimationDuration(kHoverAnimationDurationMs); 210 SetAnimationDuration(kHoverAnimationDurationMs);
213 } 211 }
214 212
215 TextButtonBase::~TextButtonBase() { 213 TextButtonBase::~TextButtonBase() {
216 } 214 }
217 215
218 void TextButtonBase::SetIsDefault(bool is_default) { 216 void TextButtonBase::SetIsDefault(bool is_default) {
219 if (is_default == is_default_) 217 if (is_default == is_default_)
220 return; 218 return;
221 is_default_ = is_default; 219 is_default_ = is_default;
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
714 if (show_multiple_icon_states_) { 712 if (show_multiple_icon_states_) {
715 if (has_hover_icon_ && (state() == STATE_HOVERED)) 713 if (has_hover_icon_ && (state() == STATE_HOVERED))
716 return icon_hover_; 714 return icon_hover_;
717 if (has_pushed_icon_ && (state() == STATE_PRESSED)) 715 if (has_pushed_icon_ && (state() == STATE_PRESSED))
718 return icon_pushed_; 716 return icon_pushed_;
719 } 717 }
720 return icon_; 718 return icon_;
721 } 719 }
722 720
723 } // namespace views 721 } // namespace views
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_view_views.cc ('k') | ui/views/controls/label_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698