elm_test: Add test edc for tooltip with no min size

See 283afce3c8acd902d4708ab491b6192f1665dd77
Test case name: Tooltip -> "Tooltip with no min size"
devs/discomfitor/rotation
Jean-Philippe Andre 6 years ago
parent ba91b00aa8
commit dd04248bb8
  1. 10
      data/Makefile.am
  2. 1
      data/elementary/objects/Makefile.am
  3. 41
      data/elementary/objects/test_tooltip.edc
  4. 21
      src/bin/elementary/test_tooltip.c

@ -218,7 +218,10 @@ elementary/objects/postit_ent.edj \
elementary/objects/multibuttonentry.edj \
elementary/objects/test_prefs.edj \
elementary/objects/test_prefs.epb \
elementary/objects/test_focus_style.edj
elementary/objects/test_focus_style.edj \
elementary/objects/test_tooltip.edj \
$(NULL)
CLEANFILES += $(elementaryobjects_DATA)
include elementary/objects/Makefile.am
@ -273,6 +276,11 @@ elementary/objects/test_focus_style.edj: elementary/objects/test_focus_style.edc
$(MKDIR_P) elementary/objects/; \
$(EDJE_CC) $(EDJE_CC_FLAGS) -id $(top_srcdir)/data/elementary/themes/img $< $@
elementary/objects/test_tooltip.edj: elementary/objects/test_tooltip.edc
$(AM_V_EDJ) \
$(MKDIR_P) elementary/objects/; \
$(EDJE_CC) $(EDJE_CC_FLAGS) -id $(top_srcdir)/data/elementary/themes/img $< $@
elementary/objects/test_prefs.epb: elementary/objects/test_prefs.epc
$(AM_V_EPB) \
$(MKDIR_P) elementary/objects/; \

@ -12,6 +12,7 @@ elementary/objects/font_preview.edc \
elementary/objects/postit_ent.edc \
elementary/objects/multibuttonentry.edc \
elementary/objects/test_focus_style.edc \
elementary/objects/test_tooltip.edc \
elementary/objects/over.png \
elementary/objects/under.png \
elementary/objects/sky.jpg \

@ -0,0 +1,41 @@
collections {
group { "elm/tooltip/base/nomin";
/* Copied from default theme */
data.item: "pad_x" "10";
data.item: "pad_y" "10";
data.item: "pad_border_x" "1";
data.item: "pad_border_y" "1";
data.item: "hide_timeout" "0.35";
data.item: "transparent" "enabled";
parts {
rect { "base";
desc { "";
color: 32 32 32 255;
}
}
rect { "outside";
desc { "";
rel1.offset: -60 -20;
rel2.offset: 59 19;
color: 32 64 96 128;
}
}
text { "info";
desc { "";
text {
font: "Sans";
size: 10;
text: "No Min Size";
}
rel1.offset: -60 -20;
rel2.offset: 59 19;
color: 255 255 255 255;
}
}
swallow { "elm.swallow.content";
desc { "";
}
}
}
}
}

@ -340,6 +340,18 @@ _tt_text_replace_timed(void *data EINA_UNUSED,
" timed");
}
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,
@ -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);

Loading…
Cancel
Save