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

Unified Diff: ash/system/tray/tray_views.cc

Issue 11110004: Make gfx::Rect class operations consistently mutate the class they are called on. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: cc/ fixes Created 8 years, 2 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 | « ash/system/drive/tray_drive.cc ('k') | ash/system/user/tray_user.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray/tray_views.cc
diff --git a/ash/system/tray/tray_views.cc b/ash/system/tray/tray_views.cc
index ddc2b8c5fe2e57ef7966f2850024ed9c217d4527..3b25b3839a68c854b2ed2a775ba17be50ffe0e2a 100644
--- a/ash/system/tray/tray_views.cc
+++ b/ash/system/tray/tray_views.cc
@@ -622,9 +622,10 @@ void SpecialPopupRow::Layout() {
gfx::Rect bounds(button_container_->GetPreferredSize());
bounds.set_height(content_bounds.height());
- bounds = content_bounds.Center(bounds.size());
- bounds.set_x(content_bounds.width() - bounds.width());
- button_container_->SetBoundsRect(bounds);
+ gfx::Rect container_bounds = content_bounds;
+ container_bounds.ClampToCenteredSize(bounds.size());
+ container_bounds.set_x(content_bounds.width() - bounds.width());
+ button_container_->SetBoundsRect(container_bounds);
bounds = content_->bounds();
bounds.set_width(button_container_->x());
« no previous file with comments | « ash/system/drive/tray_drive.cc ('k') | ash/system/user/tray_user.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698