aboutsummaryrefslogtreecommitdiffstats
path: root/legacy/elementary/src/bin/test_table.c
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2015-08-09 18:59:14 +0200
committerDave Andreoli <dave@gurumeditation.it>2015-08-09 18:59:14 +0200
commitb937433374b524e6e6cef4792d0b8504e83b1672 (patch)
tree10a52d3f4f12ab42f5f3b98ebdffe252f9fcc48f /legacy/elementary/src/bin/test_table.c
parentAdd a no-wrap mode to the "Entry Style Default" test (diff)
downloadefl-b937433374b524e6e6cef4792d0b8504e83b1672.tar.gz
Add a new (failing) test for table padding
This test expose a bug in table as explained in https://phab.enlightenment.org/T2655
Diffstat (limited to 'legacy/elementary/src/bin/test_table.c')
-rw-r--r--legacy/elementary/src/bin/test_table.c84
1 files changed, 84 insertions, 0 deletions
diff --git a/legacy/elementary/src/bin/test_table.c b/legacy/elementary/src/bin/test_table.c
index fb05e5c670..dc2c759d17 100644
--- a/legacy/elementary/src/bin/test_table.c
+++ b/legacy/elementary/src/bin/test_table.c
@@ -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);
+}