aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/elementary/test_tooltip.c
diff options
context:
space:
mode:
authorMinkyu Kang <mk7.kang@samsung.com>2017-02-27 20:13:06 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-02-27 20:13:06 +0900
commita2dd9fc99dbddc1c6612381d0544c7ced17965ec (patch)
treec170555c3495dfdeb5f453dea7d2609b38da798f /src/bin/elementary/test_tooltip.c
parentdocs: Fix typos and some wrong expressions in Ecore and Edje API reference do... (diff)
downloadefl-a2dd9fc99dbddc1c6612381d0544c7ced17965ec.tar.gz
elementary tooltip: adjust arrow if tooltip was moved
Summary: If orientation is TOP, BOTTOM, LEFT and RIGHT and tooltip was moved due to located out of screen, adjust location of arrow so that can indicate right position. Signed-off-by: Minkyu Kang <mk7.kang@samsung.com> Test Plan: elementary_test -to tooltip4 Reviewers: cedric, Hermet, jpeg Subscribers: jpeg Differential Revision: https://phab.enlightenment.org/D4554
Diffstat (limited to 'src/bin/elementary/test_tooltip.c')
-rw-r--r--src/bin/elementary/test_tooltip.c57
1 files changed, 57 insertions, 0 deletions
diff --git a/src/bin/elementary/test_tooltip.c b/src/bin/elementary/test_tooltip.c
index 23290671e8..e105b1ef65 100644
--- a/src/bin/elementary/test_tooltip.c
+++ b/src/bin/elementary/test_tooltip.c
@@ -743,3 +743,60 @@ test_tooltip3(void *data EINA_UNUSED,
evas_object_resize(win, 300, 300);
evas_object_show(win);
}
+
+void
+test_tooltip4(void *data EINA_UNUSED,
+ Evas_Object *obj EINA_UNUSED,
+ void *event_info EINA_UNUSED)
+{
+ Evas_Object *win, *bt;
+
+ win = elm_win_util_standard_add("tooltip4", "Tooltip 4");
+ elm_win_autodel_set(win, EINA_TRUE);
+ evas_object_resize(win, 300, 300);
+ evas_object_show(win);
+
+ bt = elm_button_add(win);
+ elm_object_tooltip_text_set(bt, "Tooltip!!!!!!!!!!!!!!!!!!");
+ elm_object_tooltip_orient_set(bt, ELM_TOOLTIP_ORIENT_BOTTOM);
+ evas_object_resize(bt, 30, 30);
+ evas_object_move(bt, 5, 5);
+ evas_object_show(bt);
+
+ bt = elm_button_add(win);
+ elm_object_tooltip_text_set(bt, "Tooltip!!!!!!!!!!!!!!!!!!");
+ elm_object_tooltip_orient_set(bt, ELM_TOOLTIP_ORIENT_BOTTOM);
+ evas_object_resize(bt, 30, 30);
+ evas_object_move(bt, 250, 5);
+ evas_object_show(bt);
+
+ bt = elm_button_add(win);
+ elm_object_tooltip_text_set(bt, "Tooltip!!!!!!!!!!!!!!!!!!");
+ elm_object_tooltip_orient_set(bt, ELM_TOOLTIP_ORIENT_TOP);
+ evas_object_resize(bt, 30, 30);
+ evas_object_move(bt, 25, 265);
+ evas_object_show(bt);
+
+ bt = elm_button_add(win);
+ elm_object_tooltip_text_set(bt, "Tooltip!!!!!!!!!!!!!!!!!!");
+ elm_object_tooltip_orient_set(bt, ELM_TOOLTIP_ORIENT_TOP);
+ evas_object_resize(bt, 30, 30);
+ evas_object_move(bt, 235, 265);
+ evas_object_show(bt);
+
+ bt = elm_button_add(win);
+ elm_object_tooltip_content_cb_set(bt, _tt_icon, (void *)123L,
+ _tt_icon_del);
+ elm_object_tooltip_orient_set(bt, ELM_TOOLTIP_ORIENT_RIGHT);
+ evas_object_resize(bt, 30, 30);
+ evas_object_move(bt, 135, 5);
+ evas_object_show(bt);
+
+ bt = elm_button_add(win);
+ elm_object_tooltip_content_cb_set(bt, _tt_icon, (void *)123L,
+ _tt_icon_del);
+ elm_object_tooltip_orient_set(bt, ELM_TOOLTIP_ORIENT_LEFT);
+ evas_object_resize(bt, 30, 30);
+ evas_object_move(bt, 135, 255);
+ evas_object_show(bt);
+}