diff options
author | Jean-Philippe Andre <jp.andre@samsung.com> | 2017-07-21 12:14:44 +0900 |
---|---|---|
committer | Mike Blumenkrantz <zmike@osg.samsung.com> | 2017-07-21 16:18:36 -0400 |
commit | dcf751bd3d79aed31470b2147c95a5f53663e7de (patch) | |
tree | 13fd67897564ab5eb0becc1d63e88d5ffd3b04e7 | |
parent | 337f3796d65f643b1b536e6e9b95df420669da70 (diff) | |
download | efl-dcf751bd3d79aed31470b2147c95a5f53663e7de.tar.gz |
hover: Return valid slot for main_menu_submenu
Fixes T5760
-rw-r--r-- | src/lib/elementary/elm_hover.c | 15 |
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; } |