summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-02-25 15:55:08 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-02-25 15:55:08 +0900
commit6097f06b26c023e99dc405f0f019ce9d76b773d7 (patch)
treeeed221936dc4ee280da4f9611c77ea143aaa45c7
parent03c53655ce48a4da71fbd8cf6013a279c786ebe7 (diff)
downloadenlightenment-6097f06b26c023e99dc405f0f019ce9d76b773d7.tar.gz
e - menus - fix submenu popup direction when zones are not at 0 y
-rw-r--r--src/bin/e_menu.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/bin/e_menu.c b/src/bin/e_menu.c
index 043935c3a5..01475b853b 100644
--- a/src/bin/e_menu.c
+++ b/src/bin/e_menu.c
@@ -2015,19 +2015,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
/* 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 */
- m->cur.y = (parent_item_bottom - (m->container_h + 1));
+ m->cur.y = (parent_item_bottom - (m->zone->h + 1));
else
/* 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
}
else
{
/* menu is smaller than screen */
- if (((parent_item_bottom + m->cur.h) > m->zone->h) &&
- (parent_item_bottom > (m->zone->h / 2)))
+ if (((parent_item_bottom + m->cur.h) > (m->zone->y + m->zone->h)) &&
+ (parent_item_bottom > (m->zone->y + (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->cur.h + m->parent_item->h;
else