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

Unified Diff: ash/launcher/launcher_view.cc

Issue 15774015: Fixed problem with clicking on app launcher item (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed windows build issue Created 7 years, 7 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/launcher_view.cc
diff --git a/ash/launcher/launcher_view.cc b/ash/launcher/launcher_view.cc
index 31d61ecf54821c5c97833cbccf7666f29a961d54..4bdc49eabdb8e7d8f353e1c6ad15f61c195f9502 100644
--- a/ash/launcher/launcher_view.cc
+++ b/ash/launcher/launcher_view.cc
@@ -545,6 +545,7 @@ void LauncherView::CreateDragIconProxy(
const gfx::Point& location_in_screen_coordinates,
const gfx::ImageSkia& icon,
views::View* replaced_view,
+ const gfx::Vector2d& cursor_offset_from_center,
float scale_factor) {
drag_replaced_view_ = replaced_view;
drag_image_.reset(new ash::internal::DragImageView(
@@ -553,7 +554,8 @@ void LauncherView::CreateDragIconProxy(
gfx::Size size = drag_image_->GetPreferredSize();
size.set_width(size.width() * scale_factor);
size.set_height(size.height() * scale_factor);
- drag_image_offset_ = gfx::Vector2d(size.width() / 2, size.height() / 2);
+ drag_image_offset_ = gfx::Vector2d(size.width() / 2, size.height() / 2) +
+ cursor_offset_from_center;
gfx::Rect drag_image_bounds(
GetPositionInScreen(location_in_screen_coordinates,
drag_replaced_view_) - drag_image_offset_, size);
« no previous file with comments | « ash/launcher/launcher_view.h ('k') | chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_app_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698