aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/elementary/test_tooltip.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-06-29 17:11:00 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-06-29 17:16:08 +0900
commitdd04248bb8f11076c00bc59d8d138c002bd5ae8a (patch)
tree54f4b2dbd933da82c6e573e13a6bb9dacea31f00 /src/bin/elementary/test_tooltip.c
parentels_tooltip: Remove infinite job calls (diff)
downloadefl-dd04248bb8f11076c00bc59d8d138c002bd5ae8a.tar.gz
elm_test: Add test edc for tooltip with no min size
See 283afce3c8acd902d4708ab491b6192f1665dd77 Test case name: Tooltip -> "Tooltip with no min size"
Diffstat (limited to 'src/bin/elementary/test_tooltip.c')
-rw-r--r--src/bin/elementary/test_tooltip.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/bin/elementary/test_tooltip.c b/src/bin/elementary/test_tooltip.c
index e105b1ef65..b93ffcc2a6 100644
--- a/src/bin/elementary/test_tooltip.c
+++ b/src/bin/elementary/test_tooltip.c
@@ -341,6 +341,18 @@ _tt_text_replace_timed(void *data EINA_UNUSED,
}
static Evas_Object *
+_no_min_tt_icon(void *data EINA_UNUSED,
+ Evas_Object *obj EINA_UNUSED,
+ Evas_Object *tt)
+{
+ Evas_Object *box = elm_box_add(tt);
+ evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_show(box);
+
+ return box;
+}
+
+static Evas_Object *
_tt_icon(void *data EINA_UNUSED,
Evas_Object *obj EINA_UNUSED,
Evas_Object *tt)
@@ -538,10 +550,13 @@ test_tooltip(void *data EINA_UNUSED,
evas_object_event_callback_add(bt, EVAS_CALLBACK_DEL, _tt_timer_del,
NULL);
+ /* Add no min size tooltip style */
+ elm_theme_extension_add(NULL, eina_slstr_printf("%s/objects/test_tooltip.edj", elm_app_data_dir_get()));
+
bt = elm_button_add(win);
- elm_object_text_set(bt, "Icon tooltip");
- elm_object_tooltip_content_cb_set(bt, _tt_icon, (void *)123L,
- _tt_icon_del);
+ elm_object_text_set(bt, "Tooltip with no min size");
+ elm_object_tooltip_content_cb_set(bt, _no_min_tt_icon, (void *)123L, _tt_icon_del);
+ elm_object_tooltip_style_set(bt, "nomin");
elm_box_pack_end(bx, bt);
evas_object_show(bt);