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

Unified Diff: ash/system/drive/tray_drive.cc

Issue 11270042: Add non-member non-mutating methods for common gfx::Rect operations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased 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/wm/partial_screenshot_view.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 489427ef3d71bec98e45e00158029131d12df229..d829dacd13533352f18126fa5815ea5a1c47aafa 100644
--- a/ash/system/drive/tray_drive.cc
+++ b/ash/system/drive/tray_drive.cc
@@ -220,8 +220,8 @@ class DriveDetailedView : public TrayDetailsView,
kBottomPadding -
status_img_->GetPreferredSize().height())/2),
status_img_->GetPreferredSize());
- bounds_status.Intersect(child_area);
- status_img_->SetBoundsRect(bounds_status);
+ status_img_->SetBoundsRect(
+ gfx::IntersectRects(bounds_status, child_area));
pos_x += status_img_->bounds().width() + kHorizontalPadding;
gfx::Rect bounds_label(pos_x,
@@ -231,8 +231,8 @@ class DriveDetailedView : public TrayDetailsView,
status_img_->GetPreferredSize().width() -
cancel_button_->GetPreferredSize().width(),
label_container_->GetPreferredSize().height());
- bounds_label.Intersect(child_area);
- label_container_->SetBoundsRect(bounds_label);
+ label_container_->SetBoundsRect(
+ gfx::IntersectRects(bounds_label, child_area));
pos_x += label_container_->bounds().width() + kHorizontalPadding;
gfx::Rect bounds_button(
@@ -241,8 +241,8 @@ class DriveDetailedView : public TrayDetailsView,
kBottomPadding -
cancel_button_->GetPreferredSize().height())/2),
cancel_button_->GetPreferredSize());
- bounds_button.Intersect(child_area);
- cancel_button_->SetBoundsRect(bounds_button);
+ cancel_button_->SetBoundsRect(
+ gfx::IntersectRects(bounds_button, child_area));
}
// views::ButtonListener overrides.
« no previous file with comments | « ash/launcher/launcher_view_unittest.cc ('k') | ash/wm/partial_screenshot_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698