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

Unified Diff: chrome/browser/ui/views/download/download_item_view.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: chrome/browser/ui/views/download/download_item_view.cc
diff --git a/chrome/browser/ui/views/download/download_item_view.cc b/chrome/browser/ui/views/download/download_item_view.cc
index 34696e8d230841619cc7ef031bc194db499ebc33..138f7ea8834c3e3c821f3d52827a10d427140bf8 100644
--- a/chrome/browser/ui/views/download/download_item_view.cc
+++ b/chrome/browser/ui/views/download/download_item_view.cc
@@ -426,9 +426,7 @@ bool DownloadItemView::OnMouseDragged(const ui::MouseEvent& event) {
widget ? widget->GetNativeView() : NULL);
}
}
- } else if (ExceededDragThreshold(
- event.location().x() - drag_start_point_.x(),
- event.location().y() - drag_start_point_.y())) {
+ } else if (ExceededDragThreshold(event.location() - drag_start_point_)) {
dragging_ = true;
}
return true;
@@ -676,7 +674,7 @@ void DownloadItemView::OnPaint(gfx::Canvas* canvas) {
// (hot_)body_image_set->bottom_left, and drop_down_image_set,
// for RTL UI, we flip the canvas to draw those images mirrored.
// Consequently, we do not need to mirror the x-axis of those images.
- canvas->Translate(gfx::Point(width(), 0));
+ canvas->Translate(gfx::Vector2d(width(), 0));
canvas->Scale(-1, 1);
}
PaintImages(canvas,

Powered by Google App Engine
This is Rietveld 408576698