annoyances--: do not place desktop icons under shelves.

The new trend these days seems to be "place a shelf on top of the
screen", in that case your desktop icons will get under that shelf and
looks annoying, people laugh at E users that use that :-D (fortunately
I'm the one that usually laugh...)

Fixed, but possible other places to be fixed as well. If one wants to
avoid the shelves, use the e_zone_useful_geometry_get().

e_zone now emits E_EVENT_ZONE_MOVE_RESIZE when the useful geometry
becomes dirty. Maybe it is worth to add a new signal, but I'm reusing
it until someone complains.




SVN revision: 49431
This commit is contained in:
Gustavo Sverzut Barbieri 2010-06-04 01:12:04 +00:00
parent beb63ce56d
commit f43545400a
2 changed files with 16 additions and 4 deletions

View File

@ -1005,9 +1005,16 @@ e_zone_useful_geometry_get(E_Zone *zone, int *x, int *y, int *w, int *h)
EAPI void
e_zone_useful_geometry_dirty(E_Zone *zone)
{
E_Event_Zone_Move_Resize *ev;
E_OBJECT_CHECK(zone);
E_OBJECT_TYPE_CHECK(zone, E_ZONE_TYPE);
ev = E_NEW(E_Event_Zone_Move_Resize, 1);
ev->zone = zone;
e_object_ref(E_OBJECT(ev->zone));
ecore_event_add(E_EVENT_ZONE_MOVE_RESIZE, ev, _e_zone_event_move_resize_free, NULL);
zone->useful_geometry.dirty = 1;
zone->useful_geometry.x = -1;
zone->useful_geometry.y = -1;

View File

@ -179,6 +179,7 @@ e_fwin_zone_new(E_Zone *zone, const char *dev, const char *path)
E_Fwin *fwin;
E_Fwin_Page *page;
Evas_Object *o;
int x, y, w, h;
fwin = E_OBJECT_ALLOC(E_Fwin, E_FWIN_TYPE, _e_fwin_free);
if (!fwin) return;
@ -249,8 +250,10 @@ e_fwin_zone_new(E_Zone *zone, const char *dev, const char *path)
_e_fwin_pan_child_size_get);
evas_object_propagate_events_set(page->fm_obj, 0);
page->scrollframe_obj = o;
evas_object_move(o, fwin->zone->x, fwin->zone->y);
evas_object_resize(o, fwin->zone->w, fwin->zone->h);
e_zone_useful_geometry_get(zone, &x, &y, &w, &h);
evas_object_move(o, x, y);
evas_object_resize(o, w, h);
evas_object_show(o);
e_fm2_window_object_set(page->fm_obj, E_OBJECT(fwin->zone));
@ -1375,8 +1378,10 @@ _e_fwin_zone_move_resize(void *data, int type, void *event)
}
if (fwin->cur_page->scrollframe_obj)
{
evas_object_move(fwin->cur_page->scrollframe_obj, ev->zone->x, ev->zone->y);
evas_object_resize(fwin->cur_page->scrollframe_obj, ev->zone->w, ev->zone->h);
int x, y, w, h;
e_zone_useful_geometry_get(ev->zone, &x, &y, &w, &h);
evas_object_move(fwin->cur_page->scrollframe_obj, x, y);
evas_object_resize(fwin->cur_page->scrollframe_obj, w, h);
}
return 1;
}