Commit e250cfd7 authored by Andy Hertzfeld's avatar Andy Hertzfeld

fixed bug where icons were horizontally mis-positioned after dragging;


       fixed bug where icons were horizontally mis-positioned after dragging;
       fixed by taking the center offset into account
parent 66762e61
2000-01-31 Andy Hertzfeld <andy@eazel.com>
* libnautilus/gnome-icon-container-dnd.c:
fixed bug where icons were horizontally mis-positioned after dragging;
fixed by taking the center offset into account
2000-01-31 John Sullivan <sullivan@eazel.com>
* libnautilus/nautilus-directory.h:
......
......@@ -578,8 +578,10 @@ gnome_icon_container_receive_dropped_icons (GnomeIconContainer *container,
if (item->got_icon_position) {
int icon_x, icon_y;
double scale = icon->item->canvas->pixels_per_unit;
int center_offset = nautilus_icons_view_icon_item_center_offset(icon->item);
icon_x = (int) world_x + item->icon_x;
icon_x = (int) world_x + item->icon_x - (center_offset / scale);
icon_y = (int) world_y + item->icon_y;
gnome_icon_container_move_icon
......
......@@ -578,8 +578,10 @@ gnome_icon_container_receive_dropped_icons (GnomeIconContainer *container,
if (item->got_icon_position) {
int icon_x, icon_y;
double scale = icon->item->canvas->pixels_per_unit;
int center_offset = nautilus_icons_view_icon_item_center_offset(icon->item);
icon_x = (int) world_x + item->icon_x;
icon_x = (int) world_x + item->icon_x - (center_offset / scale);
icon_y = (int) world_y + item->icon_y;
gnome_icon_container_move_icon
......
......@@ -578,8 +578,10 @@ gnome_icon_container_receive_dropped_icons (GnomeIconContainer *container,
if (item->got_icon_position) {
int icon_x, icon_y;
double scale = icon->item->canvas->pixels_per_unit;
int center_offset = nautilus_icons_view_icon_item_center_offset(icon->item);
icon_x = (int) world_x + item->icon_x;
icon_x = (int) world_x + item->icon_x - (center_offset / scale);
icon_y = (int) world_y + item->icon_y;
gnome_icon_container_move_icon
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment