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

Unified Diff: ash/launcher/overflow_bubble.cc

Issue 11269022: Add Vector2d classes that represent offsets, instead of using Point. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: RenderText fixup 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
Index: ash/launcher/overflow_bubble.cc
diff --git a/ash/launcher/overflow_bubble.cc b/ash/launcher/overflow_bubble.cc
index 1161e166b498b6d050cf312a8e7b35f9fdfd4aa4..b6e7abb5679c0b8ce1d73dfcd1f84046fdf78d0a 100644
--- a/ash/launcher/overflow_bubble.cc
+++ b/ash/launcher/overflow_bubble.cc
@@ -84,7 +84,7 @@ class OverflowBubbleView : public views::BubbleDelegateView {
ShelfAlignment shelf_alignment_;
LauncherView* launcher_view_; // Owned by views hierarchy.
- gfx::Point scroll_offset_;
+ gfx::Vector2d scroll_offset_;
DISALLOW_COPY_AND_ASSIGN(OverflowBubbleView);
};
@@ -166,8 +166,8 @@ gfx::Size OverflowBubbleView::GetPreferredSize() {
}
void OverflowBubbleView::Layout() {
- const gfx::Point origin(-scroll_offset_.x(), -scroll_offset_.y());
- launcher_view_->SetBoundsRect(gfx::Rect(origin, GetContentsSize()));
+ launcher_view_->SetBoundsRect(gfx::Rect(
+ gfx::PointAtOffsetFromOrigin(-scroll_offset_), GetContentsSize()));
}
void OverflowBubbleView::ChildPreferredSizeChanged(views::View* child) {

Powered by Google App Engine
This is Rietveld 408576698