forked from enlightenment/efl
[tooltip] use proper object to set tooltip layer
Summary: tooltip could be hide by the other object which have lower layer than target object of tooltip. the layer of content could be changed, when is set to the tooltip as a content. @fix Test Plan: check added test lines Reviewers: cedric, jpeg, seoz, raster Reviewed By: raster Subscribers: singh.amitesh, stefan_schmidt, seoz Differential Revision: https://phab.enlightenment.org/D1889
This commit is contained in:
parent
3e2e181bc3
commit
02693dbc02
|
@ -191,6 +191,7 @@ void test_launcher3(void *data, Evas_Object *obj, void *event_info);
|
|||
void test_anim(void *data, Evas_Object *obj, void *event_info);
|
||||
void test_tooltip(void *data, Evas_Object *obj, void *event_info);
|
||||
void test_tooltip2(void *data, Evas_Object *obj, void *event_info);
|
||||
void test_tooltip3(void *data, Evas_Object *obj, void *event_info);
|
||||
void test_cursor(void *data, Evas_Object *obj, void *event_info);
|
||||
void test_cursor2(void *data, Evas_Object *obj, void *event_info);
|
||||
void test_cursor3(void *data, Evas_Object *obj, void *event_info);
|
||||
|
@ -761,6 +762,7 @@ add_tests:
|
|||
ADD_TEST(NULL, "Popups", "Notify", test_notify);
|
||||
ADD_TEST(NULL, "Popups", "Tooltip", test_tooltip);
|
||||
ADD_TEST(NULL, "Popups", "Tooltip 2", test_tooltip2);
|
||||
ADD_TEST(NULL, "Popups", "Tooltip 3", test_tooltip3);
|
||||
ADD_TEST(NULL, "Popups", "Popup", test_popup);
|
||||
|
||||
//------------------------------//
|
||||
|
|
|
@ -715,3 +715,31 @@ test_tooltip2(void *data EINA_UNUSED,
|
|||
evas_object_resize(win, 320, 480);
|
||||
evas_object_show(win);
|
||||
}
|
||||
|
||||
void
|
||||
test_tooltip3(void *data EINA_UNUSED,
|
||||
Evas_Object *obj EINA_UNUSED,
|
||||
void *event_info EINA_UNUSED)
|
||||
{
|
||||
Evas_Object *win, *bt, *rect;
|
||||
|
||||
win = elm_win_util_standard_add("tooltip3", "Tooltip 3");
|
||||
elm_win_autodel_set(win, EINA_TRUE);
|
||||
|
||||
bt = elm_button_add(win);
|
||||
elm_object_text_set(bt, "I have layer 200, below rect has layer 100.");
|
||||
elm_object_tooltip_text_set(bt, "Can you see me?");
|
||||
evas_object_resize(bt, 250, 30);
|
||||
evas_object_move(bt, 25, 135);
|
||||
evas_object_layer_set(bt, 200);
|
||||
evas_object_show(bt);
|
||||
|
||||
rect = evas_object_rectangle_add(evas_object_evas_get(bt));
|
||||
evas_object_resize(rect, 150, 300);
|
||||
evas_object_move(rect, 0, 0);
|
||||
evas_object_show(rect);
|
||||
evas_object_layer_set(rect, 100);
|
||||
|
||||
evas_object_resize(win, 300, 300);
|
||||
evas_object_show(win);
|
||||
}
|
||||
|
|
|
@ -368,7 +368,6 @@ _elm_tooltip_reconfigure(Elm_Tooltip *tt)
|
|||
return;
|
||||
}
|
||||
evas_object_show(tt->content);
|
||||
evas_object_layer_set(tt->content, ELM_OBJECT_LAYER_TOOLTIP);
|
||||
evas_object_pass_events_set(tt->content, EINA_TRUE);
|
||||
edje_object_part_swallow
|
||||
(tt->tooltip, "elm.swallow.content", tt->content);
|
||||
|
@ -377,6 +376,8 @@ _elm_tooltip_reconfigure(Elm_Tooltip *tt)
|
|||
evas_object_event_callback_add(tt->content, EVAS_CALLBACK_DEL,
|
||||
_elm_tooltip_content_del_cb, tt);
|
||||
|
||||
/* tooltip has to use layer tooltip */
|
||||
evas_object_layer_set(tt->tooltip, ELM_OBJECT_LAYER_TOOLTIP);
|
||||
}
|
||||
TTDBG("*******RECALC\n");
|
||||
evas_object_size_hint_min_get(tt->content, &ominw, &ominh);
|
||||
|
|
Loading…
Reference in New Issue