forked from enlightenment/efl
Add a new (failing) test for table padding
This test expose a bug in table as explained in T2655
This commit is contained in:
parent
fd95ba8362
commit
b937433374
|
@ -132,6 +132,7 @@ void test_table4(void *data, Evas_Object *obj, void *event_info);
|
|||
void test_table5(void *data, Evas_Object *obj, void *event_info);
|
||||
void test_table6(void *data, Evas_Object *obj, void *event_info);
|
||||
void test_table7(void *data, Evas_Object *obj, void *event_info);
|
||||
void test_table8(void *data, Evas_Object *obj, void *event_info);
|
||||
void test_gengrid(void *data, Evas_Object *obj, void *event_info);
|
||||
void test_gengrid2(void *data, Evas_Object *obj, void *event_info);
|
||||
void test_gengrid3(void *data, Evas_Object *obj, void *event_info);
|
||||
|
@ -575,6 +576,7 @@ add_tests:
|
|||
ADD_TEST(NULL, "Containers", "Table 5", test_table5);
|
||||
ADD_TEST(NULL, "Containers", "Table 6", test_table6);
|
||||
ADD_TEST(NULL, "Containers", "Table 7", test_table7);
|
||||
ADD_TEST(NULL, "Containers", "Table Padding", test_table8);
|
||||
ADD_TEST(NULL, "Containers", "Layout", test_layout);
|
||||
ADD_TEST(NULL, "Containers", "Layout 2", test_layout2);
|
||||
ADD_TEST(NULL, "Containers", "Grid", test_grid);
|
||||
|
|
|
@ -388,3 +388,87 @@ test_table7(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
|
|||
|
||||
evas_object_show(win);
|
||||
}
|
||||
|
||||
void
|
||||
test_table8(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
{
|
||||
Evas_Object *win, *tb, *bt;
|
||||
|
||||
win = elm_win_util_standard_add("table8", "Table Padding");
|
||||
elm_win_autodel_set(win, EINA_TRUE);
|
||||
|
||||
tb = elm_table_add(win);
|
||||
elm_table_padding_set(tb, 10, 10);
|
||||
evas_object_size_hint_weight_set(tb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
elm_win_resize_object_add(win, tb);
|
||||
evas_object_show(tb);
|
||||
|
||||
// first row
|
||||
bt = elm_button_add(win);
|
||||
elm_object_text_set(bt, "colspan 1");
|
||||
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
elm_table_pack(tb, bt, 0, 0, 1, 1);
|
||||
evas_object_show(bt);
|
||||
|
||||
bt = elm_button_add(win);
|
||||
elm_object_text_set(bt, "colspan 1");
|
||||
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
elm_table_pack(tb, bt, 1, 0, 1, 1);
|
||||
evas_object_show(bt);
|
||||
|
||||
bt = elm_button_add(win);
|
||||
elm_object_text_set(bt, "colspan 1");
|
||||
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
elm_table_pack(tb, bt, 2, 0, 1, 1);
|
||||
evas_object_show(bt);
|
||||
|
||||
// second row
|
||||
bt = elm_button_add(win);
|
||||
elm_object_text_set(bt, "colspan 3");
|
||||
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
elm_table_pack(tb, bt, 0, 1, 3, 1);
|
||||
evas_object_show(bt);
|
||||
|
||||
// third row
|
||||
bt = elm_button_add(win);
|
||||
elm_object_text_set(bt, "rowspan 1");
|
||||
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
elm_table_pack(tb, bt, 0, 2, 1, 1);
|
||||
evas_object_show(bt);
|
||||
|
||||
bt = elm_button_add(win);
|
||||
elm_object_text_set(bt, "rowspan 1");
|
||||
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
elm_table_pack(tb, bt, 1, 2, 1, 1);
|
||||
evas_object_show(bt);
|
||||
|
||||
bt = elm_button_add(win);
|
||||
elm_object_text_set(bt, "rowspan 2");
|
||||
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
elm_table_pack(tb, bt, 2, 2, 1, 2);
|
||||
evas_object_show(bt);
|
||||
|
||||
// fourth row
|
||||
bt = elm_button_add(win);
|
||||
elm_object_text_set(bt, "rowspan 1");
|
||||
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
elm_table_pack(tb, bt, 0, 3, 1, 1);
|
||||
evas_object_show(bt);
|
||||
|
||||
bt = elm_button_add(win);
|
||||
elm_object_text_set(bt, "rowspan 1");
|
||||
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
elm_table_pack(tb, bt, 1, 3, 1, 1);
|
||||
evas_object_show(bt);
|
||||
|
||||
evas_object_show(win);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue