gtkiconview: Take padding into account when getting the cursor hotspot

This makes the icon view look completely seamless when dragging.

https://bugzilla.gnome.org/show_bug.cgi?id=705605
This commit is contained in:
Jasper St. Pierre 2013-08-07 04:57:33 -04:00
parent d72252c7d6
commit 5674f2ce50

View File

@ -6486,8 +6486,8 @@ gtk_icon_view_drag_begin (GtkWidget *widget,
g_return_if_fail (item != NULL);
x = icon_view->priv->press_start_x - item->cell_area.x;
y = icon_view->priv->press_start_y - item->cell_area.y;
x = icon_view->priv->press_start_x - item->cell_area.x + icon_view->priv->item_padding;
y = icon_view->priv->press_start_y - item->cell_area.y + icon_view->priv->item_padding;
path = gtk_tree_path_new_from_indices (item->index, -1);
icon = gtk_icon_view_create_drag_icon (icon_view, path);