test_label: Cleanup label wrap test.
authorDaniel Juyung Seo <seojuyung2@gmail.com>
Wed, 4 Feb 2015 01:16:57 +0000 (10:16 +0900)
committerDaniel Juyung Seo <seojuyung2@gmail.com>
Wed, 4 Feb 2015 01:16:59 +0000 (10:16 +0900)
- remove unnecessary box.
- use ELM_SCALE_SIZE macro for a better scalability.

legacy/elementary/src/bin/test_label.c

index 9ccf217..02b1508 100644 (file)
@@ -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);
 }