summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-07-21 12:14:44 +0900
committerMike Blumenkrantz <zmike@osg.samsung.com>2017-07-21 16:18:36 -0400
commitdcf751bd3d79aed31470b2147c95a5f53663e7de (patch)
tree13fd67897564ab5eb0becc1d63e88d5ffd3b04e7
parent337f3796d65f643b1b536e6e9b95df420669da70 (diff)
downloadefl-dcf751bd3d79aed31470b2147c95a5f53663e7de.tar.gz
hover: Return valid slot for main_menu_submenu
Fixes T5760
-rw-r--r--src/lib/elementary/elm_hover.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/lib/elementary/elm_hover.c b/src/lib/elementary/elm_hover.c
index defe5d5430..6a150d21ba 100644
--- a/src/lib/elementary/elm_hover.c
+++ b/src/lib/elementary/elm_hover.c
@@ -47,6 +47,12 @@ const Elm_Layout_Part_Alias_Description _content_aliases[] =
{NULL, NULL}
};
+const Elm_Layout_Part_Alias_Description _content_aliases_main_menu_submenu[] =
+{
+ {"bottom", "elm.swallow.slot.bottom"},
+ {NULL, NULL}
+};
+
#define ELM_PRIV_HOVER_SIGNALS(cmd) \
cmd(SIG_CLICKED, "clicked", "") \
cmd(SIG_DISMISSED, "dismissed", "") \
@@ -674,8 +680,13 @@ _elm_hover_efl_gfx_visible_set(Eo *obj, Elm_Hover_Data *pd, Eina_Bool vis)
}
EOLIAN static const Elm_Layout_Part_Alias_Description*
-_elm_hover_elm_layout_content_aliases_get(Eo *obj EINA_UNUSED, Elm_Hover_Data *_pd EINA_UNUSED)
+_elm_hover_elm_layout_content_aliases_get(Eo *obj, Elm_Hover_Data *_pd EINA_UNUSED)
{
+ const char *style = elm_widget_style_get(obj);
+
+ // main_menu_submenu only has a single slot "bottom"
+ if (style && strstr(style, "main_menu_submenu"))
+ return _content_aliases_main_menu_submenu;
return _content_aliases;
}
@@ -806,7 +817,7 @@ _elm_hover_best_content_location_get(const Eo *obj EINA_UNUSED, Elm_Hover_Data *
}
else if (pref_axis == ELM_HOVER_AXIS_VERTICAL)
{
- if (spc_t < spc_b) return (_HOV_BOTTOM)->swallow;
+ if (spc_t <= spc_b) return (_HOV_BOTTOM)->swallow;
else return (_HOV_TOP)->swallow;
}