Enlightenment CVS committal Author : raster Project : e17 Module : apps/e
Dir : e17/apps/e/src/bin Modified Files: e_menu.c Log Message: patches from the world - fixes and todo's =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_menu.c,v retrieving revision 1.66 retrieving revision 1.67 diff -u -3 -r1.66 -r1.67 --- e_menu.c 3 Sep 2006 11:32:13 -0000 1.66 +++ e_menu.c 7 Sep 2006 10:33:57 -0000 1.67 @@ -1842,10 +1842,33 @@ _e_menu_reposition(E_Menu *m) { Evas_List *l, *tmp = NULL; + int parent_item_bottom; if (!m->parent_item) return; m->cur.x = m->parent_item->menu->cur.x + m->parent_item->menu->cur.w; - m->cur.y = m->parent_item->menu->cur.y + m->parent_item->y - m->container_y; + + parent_item_bottom = m->parent_item->menu->cur.y + m->parent_item->y; + if(m->cur.h > m->zone->h) + { + /* menu is larger than screen */ + if(parent_item_bottom > (m->zone->h / 2)) + /* more is shown if menu goes up */ + m->cur.y = (parent_item_bottom - (m->container_h + 1)); + else + /* more is shown if menu goes down */ + m->cur.y = parent_item_bottom - m->container_y; + } + else + { + /* menu is smaller than screen */ + if(((parent_item_bottom + m->cur.h - m->container_y) > m->zone->h) && + (parent_item_bottom > (m->zone->h / 2))) + /* menu is partially out of screen and more is shown if menu goes up */ + m->cur.y = (parent_item_bottom - (m->container_h + 1)); + else + m->cur.y = parent_item_bottom - m->container_y; + } + /* FIXME: this will suck for big menus */ for (l = _e_active_menus; l; l = l->next) { ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs