added another test for "big" tooltips, showcases obvious bug where tooltip is cut...
authordiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sat, 23 Jul 2011 18:24:12 +0000 (18:24 +0000)
committerdiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sat, 23 Jul 2011 18:24:12 +0000 (18:24 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@61617 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/bin/test_tooltip.c

index f937c06..c5ca4bb 100644 (file)
@@ -121,6 +121,19 @@ _tt_item_icon(void *data   __UNUSED__,
    return ic;
 }
 
+static Evas_Object *
+_tt_item_icon2(void *data   __UNUSED__,
+              Evas_Object *obj,
+              void *item   __UNUSED__)
+{
+   Evas_Object *ic = elm_icon_add(obj);
+   char buf[PATH_MAX];
+   snprintf(buf, sizeof(buf), "%s/images/logo.png", PACKAGE_DATA_DIR);
+   elm_icon_file_set(ic, buf, NULL);
+   elm_icon_scale_set(ic, 0, 0);
+   return ic;
+}
+
 static void
 _tt_item_icon_del(void            *data,
                   Evas_Object *obj __UNUSED__,
@@ -432,6 +445,8 @@ test_tooltip(void *data       __UNUSED__,
    elm_list_item_tooltip_text_set(li, "Something useful here?");
    li = elm_list_item_append(lst, "Icon Tooltip", NULL, NULL, NULL, NULL);
    elm_list_item_tooltip_content_cb_set(li, _tt_item_icon, NULL, NULL);
+   li = elm_list_item_append(lst, "Big Icon Tooltip", NULL, NULL, NULL, NULL);
+   elm_list_item_tooltip_content_cb_set(li, _tt_item_icon2, NULL, NULL);
    evas_object_size_hint_weight_set(lst, EVAS_HINT_EXPAND,
                                     EVAS_HINT_EXPAND);
    evas_object_size_hint_align_set(lst, EVAS_HINT_FILL, EVAS_HINT_FILL);