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

Unified Diff: ash/system/drive/tray_drive.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/launcher/launcher_view_unittest.cc ('k') | ash/system/tray/tray_views.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/drive/tray_drive.cc
diff --git a/ash/system/drive/tray_drive.cc b/ash/system/drive/tray_drive.cc
index f37ad80d037f1a03f302e22fc44749832d92fd86..489427ef3d71bec98e45e00158029131d12df229 100644
--- a/ash/system/drive/tray_drive.cc
+++ b/ash/system/drive/tray_drive.cc
@@ -220,7 +220,8 @@ class DriveDetailedView : public TrayDetailsView,
kBottomPadding -
status_img_->GetPreferredSize().height())/2),
status_img_->GetPreferredSize());
- status_img_->SetBoundsRect(bounds_status.Intersect(child_area));
+ bounds_status.Intersect(child_area);
+ status_img_->SetBoundsRect(bounds_status);
pos_x += status_img_->bounds().width() + kHorizontalPadding;
gfx::Rect bounds_label(pos_x,
@@ -230,7 +231,8 @@ class DriveDetailedView : public TrayDetailsView,
status_img_->GetPreferredSize().width() -
cancel_button_->GetPreferredSize().width(),
label_container_->GetPreferredSize().height());
- label_container_->SetBoundsRect(bounds_label.Intersect(child_area));
+ bounds_label.Intersect(child_area);
+ label_container_->SetBoundsRect(bounds_label);
pos_x += label_container_->bounds().width() + kHorizontalPadding;
gfx::Rect bounds_button(
@@ -239,7 +241,8 @@ class DriveDetailedView : public TrayDetailsView,
kBottomPadding -
cancel_button_->GetPreferredSize().height())/2),
cancel_button_->GetPreferredSize());
- cancel_button_->SetBoundsRect(bounds_button.Intersect(child_area));
+ bounds_button.Intersect(child_area);
+ cancel_button_->SetBoundsRect(bounds_button);
}
// views::ButtonListener overrides.
« no previous file with comments | « ash/launcher/launcher_view_unittest.cc ('k') | ash/system/tray/tray_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698