From d4e4ed0e0b2d7f34c38a6084cef752ac4c2a2484 Mon Sep 17 00:00:00 2001 From: Daniel Juyung Seo Date: Wed, 4 Feb 2015 10:16:57 +0900 Subject: [PATCH] test_label: Cleanup label wrap test. - remove unnecessary box. - use ELM_SCALE_SIZE macro for a better scalability. --- legacy/elementary/src/bin/test_label.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/legacy/elementary/src/bin/test_label.c b/legacy/elementary/src/bin/test_label.c index 9ccf217..02b1508 100644 --- a/legacy/elementary/src/bin/test_label.c +++ b/legacy/elementary/src/bin/test_label.c @@ -292,11 +292,10 @@ test_label_slide(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve void test_label_wrap(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { - Evas_Object *win, *bx, *lb; + Evas_Object *win, *lb; - win = elm_win_util_standard_add("label-wrap", "Label wrap"); + win = elm_win_util_standard_add("label-wrap", "Label Wrap"); elm_win_autodel_set(win, EINA_TRUE); - bx = elm_box_add(win); lb = elm_label_add(win); elm_object_text_set(lb, @@ -304,13 +303,10 @@ test_label_wrap(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *even "not too long. The label is designed to have line-wrap." ); elm_label_line_wrap_set(lb, ELM_WRAP_CHAR); - elm_label_wrap_width_set(lb, 200); - evas_object_size_hint_weight_set(lb, EVAS_HINT_EXPAND, 0.0); - evas_object_size_hint_align_set(lb, EVAS_HINT_FILL, EVAS_HINT_FILL); - elm_box_pack_end(bx, lb); + elm_label_wrap_width_set(lb, ELM_SCALE_SIZE(200)); + evas_object_size_hint_weight_set(lb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_win_resize_object_add(win, lb); evas_object_show(lb); - evas_object_show(bx); evas_object_show(win); - elm_win_resize_object_add(win, bx); } -- 2.7.4