e - menus - fix submenu popup direction when zones are not at 0 y

This commit is contained in:
Carsten Haitzler 2015-02-25 15:55:08 +09:00 committed by Mike Blumenkrantz
parent df7a245f55
commit e7924ad814
1 changed files with 5 additions and 5 deletions

View File

@ -2122,19 +2122,19 @@ _e_menu_reposition(E_Menu *m)
{ {
#if 0 // we can't win - we just flip back and forth, so let it go off and use scrolling #if 0 // we can't win - we just flip back and forth, so let it go off and use scrolling
/* menu is larger than screen */ /* menu is larger than screen */
if (parent_item_bottom > (m->zone->h / 2)) if (parent_item_bottom > (m->zone->y + (m->zone->h / 2)))
/* more is shown if menu goes up */ /* more is shown if menu goes up */
m->cur.y = (parent_item_bottom - (m->container_h + 1)); m->cur.y = (parent_item_bottom - (m->zone->h + 1));
else else
/* more is shown if menu goes down */ /* more is shown if menu goes down */
m->cur.y = parent_item_bottom - m->container_y; m->cur.y = parent_item_bottom - m->zone->y;
#endif #endif
} }
else else
{ {
/* menu is smaller than screen */ /* menu is smaller than screen */
if (((parent_item_bottom + m->cur.h) > m->zone->h) && if (((parent_item_bottom + m->cur.h) > (m->zone->y + m->zone->h)) &&
(parent_item_bottom > (m->zone->h / 2))) (parent_item_bottom > (m->zone->y + (m->zone->h / 2))))
/* menu is partially out of screen and more is shown if menu goes up */ /* menu is partially out of screen and more is shown if menu goes up */
m->cur.y = parent_item_bottom - m->cur.h + m->parent_item->h; m->cur.y = parent_item_bottom - m->cur.h + m->parent_item->h;
else else