From: raster Date: Thu, 16 Feb 2012 04:54:12 +0000 (+0000) Subject: add test for padding in table X-Git-Tag: REL_F_I9500_20120323_1~17^2~710 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fffcb3e7918f3a16a3da23042f62074a45f927f2;hp=9a3ffb6a793323effda1d700ce97611b386daedb;p=framework%2Fuifw%2Felementary.git add test for padding in table git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@67997 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/bin/test.c b/src/bin/test.c index 9181b75..17b128d 100644 --- a/src/bin/test.c +++ b/src/bin/test.c @@ -86,6 +86,7 @@ void test_table3(void *data, Evas_Object *obj, void *event_info); 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_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); @@ -349,6 +350,7 @@ add_tests: ADD_TEST(NULL, "Containers", "Table 4", test_table4); 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", "Layout", test_layout); ADD_TEST(NULL, "Containers", "Grid", test_grid); diff --git a/src/bin/test_table.c b/src/bin/test_table.c index f5900bb..4033e82 100644 --- a/src/bin/test_table.c +++ b/src/bin/test_table.c @@ -366,4 +366,69 @@ test_table6(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info evas_object_show(win); } +void +test_table7(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +{ + Evas_Object *win, *bg, *tb, *bt; + + win = elm_win_add(NULL, "table7", ELM_WIN_BASIC); + elm_win_title_set(win, "Table 7"); + elm_win_autodel_set(win, EINA_TRUE); + + bg = elm_bg_add(win); + evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_win_resize_object_add(win, bg); + evas_object_show(bg); + + tb = elm_table_add(win); + elm_table_padding_set(tb, 10, 20); + elm_win_resize_object_add(win, tb); + evas_object_size_hint_weight_set(tb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_show(tb); + + bt = elm_button_add(win); + elm_object_text_set(bt, "C"); + 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, 1, 2, 2); + evas_object_show(bt); + + bt = elm_button_add(win); + elm_object_text_set(bt, "A"); + 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, 1, 2, 2); + evas_object_show(bt); + + bt = elm_button_add(win); + elm_object_text_set(bt, "Blah blah blah"); + 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, 3, 0, 2, 3); + evas_object_show(bt); + + bt = elm_button_add(win); + elm_object_text_set(bt, "Hallow"); + 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, 10, 1); + evas_object_show(bt); + + bt = elm_button_add(win); + elm_object_text_set(bt, "B"); + 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, 1, 1, 1); + evas_object_show(bt); + + bt = elm_button_add(win); + elm_object_text_set(bt, "Wide"); + 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, 7, 7, 2); + evas_object_show(bt); + + evas_object_show(win); +} + #endif