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

Unified Diff: ui/views/bubble/bubble_frame_view.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_border.cc ('k') | ui/views/controls/button/label_button.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/bubble/bubble_frame_view.cc
diff --git a/ui/views/bubble/bubble_frame_view.cc b/ui/views/bubble/bubble_frame_view.cc
index 050a408f5900179b6b0629519926696f2c530067..a6e56ad9fd0fed55fa049b583cc745603023439a 100644
--- a/ui/views/bubble/bubble_frame_view.cc
+++ b/ui/views/bubble/bubble_frame_view.cc
@@ -146,7 +146,7 @@ gfx::Size BubbleFrameView::GetPreferredSize() {
close_->width() + 1;
if (titlebar_extra_view_ != NULL)
title_bar_width += titlebar_extra_view_->GetPreferredSize().width();
- size.ClampToMin(gfx::Size(title_bar_width, 0));
+ size.SetToMax(gfx::Size(title_bar_width, 0));
return size;
}
@@ -161,14 +161,14 @@ void BubbleFrameView::Layout() {
title_bounds.Inset(kTitleLeftInset, kTitleTopInset, 0, 0);
gfx::Size title_size(title_->GetPreferredSize());
const int title_width = std::max(0, close_->bounds().x() - title_bounds.x());
- title_size.ClampToMax(gfx::Size(title_width, title_size.height()));
+ title_size.SetToMin(gfx::Size(title_width, title_size.height()));
title_bounds.set_size(title_size);
title_->SetBoundsRect(title_bounds);
if (titlebar_extra_view_) {
const int extra_width = close_->bounds().x() - title_->bounds().right();
gfx::Size size = titlebar_extra_view_->GetPreferredSize();
- size.ClampToMax(gfx::Size(std::max(0, extra_width), size.height()));
+ size.SetToMin(gfx::Size(std::max(0, extra_width), size.height()));
gfx::Rect titlebar_extra_view_bounds(
bounds.right() - size.width(),
title_bounds.y(),
« no previous file with comments | « ui/views/bubble/bubble_border.cc ('k') | ui/views/controls/button/label_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698