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

Unified Diff: ui/views/controls/button/label_button.cc

Issue 14367021: Rename ClampToMin and ClampToMax (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/bubble/bubble_frame_view.cc ('k') | ui/views/controls/scrollbar/kennedy_scroll_bar.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/button/label_button.cc
diff --git a/ui/views/controls/button/label_button.cc b/ui/views/controls/button/label_button.cc
index aca2427aafc83b774551be541e67ebb730c483ee..6014bdc9cff9a71322b1e946caf94c4f40314ee9 100644
--- a/ui/views/controls/button/label_button.cc
+++ b/ui/views/controls/button/label_button.cc
@@ -174,12 +174,12 @@ gfx::Size LabelButton::GetPreferredSize() {
gfx::Size size(label.GetPreferredSize());
if (image_width > 0 && size.width() > 0)
size.Enlarge(kSpacing, 0);
- size.ClampToMin(gfx::Size(0, image_size.height()));
+ size.SetToMax(gfx::Size(0, image_size.height()));
const gfx::Insets insets(GetInsets());
size.Enlarge(image_size.width() + insets.width(), insets.height());
// Increase the minimum size monotonically with the preferred size.
- size.ClampToMin(min_size_);
+ size.SetToMax(min_size_);
min_size_ = size;
// Return the largest known size clamped to the maximum size (if valid).
« no previous file with comments | « ui/views/bubble/bubble_frame_view.cc ('k') | ui/views/controls/scrollbar/kennedy_scroll_bar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698