change one of the tooltip tests to exhibit a pretty hilarious tooltip-related label bug
authordiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 1 Aug 2011 00:49:46 +0000 (00:49 +0000)
committerdiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 1 Aug 2011 00:49:46 +0000 (00:49 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@61930 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/bin/test_tooltip.c

index 551eb9a..94e2861 100644 (file)
@@ -150,6 +150,21 @@ _tt_item_icon3(void *data   __UNUSED__,
    return ic;
 }
 
+static Evas_Object *
+_tt_item_label(void *data   __UNUSED__,
+              Evas_Object *obj __UNUSED__,
+              Evas_Object *tt,
+              void *item   __UNUSED__)
+{
+   Evas_Object *l = elm_label_add(tt);
+   elm_object_text_set(l, "Something useful here?<ps>"
+                          "No probably not, but this is a super long label<ps>"
+                          "which probably breaks on your system, now doesn't it?<ps>"
+                          "Yeah, I thought so.");
+   elm_label_line_wrap_set(l, ELM_WRAP_MIXED);
+   return l;
+}
+
 static void
 _tt_item_icon_del(void            *data,
                   Evas_Object *obj __UNUSED__,
@@ -460,7 +475,8 @@ test_tooltip(void *data       __UNUSED__,
 
    lst = elm_list_add(win);
    li = elm_list_item_append(lst, "Hello", NULL, NULL, NULL, NULL);
-   elm_list_item_tooltip_text_set(li, "Something useful here?");
+   elm_list_item_tooltip_content_cb_set(li, _tt_item_label, NULL, NULL);
+   elm_list_item_tooltip_size_restrict_disable(li, EINA_TRUE);
    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);