[gtk+] gtkiconview: Take padding into account when getting the cursor hotspot
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gtkiconview: Take padding into account when getting the cursor hotspot
- Date: Wed, 7 Aug 2013 15:54:36 +0000 (UTC)
commit 5674f2ce50887805afb539648d6a0e6f063ddd43
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Wed Aug 7 04:57:33 2013 -0400
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
gtk/gtkiconview.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c
index 88f72bb..0524979 100644
--- a/gtk/gtkiconview.c
+++ b/gtk/gtkiconview.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]