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

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

Issue 8909002: views: Convert IsEnabled() to just enabled() since it's just a simple accessor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 404
405 void TextButtonBase::OnPaint(gfx::Canvas* canvas) { 405 void TextButtonBase::OnPaint(gfx::Canvas* canvas) {
406 PaintButton(canvas, PB_NORMAL); 406 PaintButton(canvas, PB_NORMAL);
407 } 407 }
408 408
409 const ui::Animation* TextButtonBase::GetAnimation() const { 409 const ui::Animation* TextButtonBase::GetAnimation() const {
410 return hover_animation_.get(); 410 return hover_animation_.get();
411 } 411 }
412 412
413 void TextButtonBase::UpdateColor() { 413 void TextButtonBase::UpdateColor() {
414 color_ = View::IsEnabled() ? color_enabled_ : color_disabled_; 414 color_ = enabled() ? color_enabled_ : color_disabled_;
415 } 415 }
416 416
417 void TextButtonBase::UpdateTextSize() { 417 void TextButtonBase::UpdateTextSize() {
418 CalculateTextSize(&text_size_, width()); 418 CalculateTextSize(&text_size_, width());
419 max_text_size_.SetSize(std::max(max_text_size_.width(), text_size_.width()), 419 max_text_size_.SetSize(std::max(max_text_size_.width(), text_size_.width()),
420 std::max(max_text_size_.height(), 420 std::max(max_text_size_.height(),
421 text_size_.height())); 421 text_size_.height()));
422 PreferredSizeChanged(); 422 PreferredSizeChanged();
423 } 423 }
424 424
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
851 #endif 851 #endif
852 } 852 }
853 853
854 void NativeTextButton::GetExtraParams( 854 void NativeTextButton::GetExtraParams(
855 gfx::NativeTheme::ExtraParams* params) const { 855 gfx::NativeTheme::ExtraParams* params) const {
856 TextButton::GetExtraParams(params); 856 TextButton::GetExtraParams(params);
857 params->button.has_border = true; 857 params->button.has_border = true;
858 } 858 }
859 859
860 } // namespace views 860 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/button/custom_button.cc ('k') | ui/views/controls/combobox/native_combobox_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698