To fit a square icon into a rectangle, find the min side length.

SVN revision: 35573
This commit is contained in:
Sebastian Dransfeld 2008-08-19 05:59:12 +00:00
parent 4bf7231142
commit ec395ca318
1 changed files with 4 additions and 4 deletions

View File

@ -712,12 +712,12 @@ _e_int_menus_apps_drag(void *data, E_Menu *m, E_Menu_Item *mi)
evas_object_geometry_get(mi->icon_object, &x, &y, &w, &h);
drag = e_drag_new(m->zone->container, x, y, drag_types, 1, desktop, -1,
NULL, NULL);
NULL, NULL);
size = MAX(w, h);
o = e_util_desktop_icon_add(desktop, size, e_drag_evas_get(drag));
size = MIN(w, h);
o = e_util_desktop_icon_add(desktop, size, e_drag_evas_get(drag));
e_drag_object_set(drag, o);
e_drag_resize(drag, w, h);
e_drag_resize(drag, w, h);
e_drag_start(drag, mi->drag.x + w, mi->drag.y + h);
}
}