elm_test: Set label as word wrap
authorJean-Philippe Andre <jp.andre@samsung.com>
Tue, 18 Jul 2017 09:06:17 +0000 (18:06 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Tue, 18 Jul 2017 09:42:16 +0000 (18:42 +0900)
This exposes an elm_win sizing bug. To test (under X):
  ELM_DISABLE_EXTERNAL_MENU=1 elementary_test -to "Main Menu"

The layout is not completely wrong 100% of the time, but it is
exactly correct 0% of the time. Window sizing is our flying
spaghetti monster.

src/bin/elementary/test_main_menu.c

index 40a52c5..bb52527 100644 (file)
@@ -50,8 +50,9 @@ test_main_menu(void *data EINA_UNUSED,
         label = elm_label_add(win);
         elm_object_text_set(label, "(ELM_DISABLE_EXTERNAL_MENU environment "
                             "variable is set. Using local menu instead)");
-        evas_object_size_hint_weight_set(label, EVAS_HINT_EXPAND,
-                                         EVAS_HINT_EXPAND);
+        evas_object_size_hint_weight_set(label, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+        evas_object_size_hint_align_set(label, EVAS_HINT_FILL, EVAS_HINT_FILL);
+        elm_label_line_wrap_set(label, ELM_WRAP_WORD);
         elm_box_pack_end(bx, label);
         evas_object_show(label);
      }