aboutsummaryrefslogtreecommitdiffstats
path: root/legacy/elementary/src/bin
diff options
context:
space:
mode:
Diffstat (limited to 'legacy/elementary/src/bin')
-rw-r--r--legacy/elementary/src/bin/test_layout.c27
1 files changed, 25 insertions, 2 deletions
diff --git a/legacy/elementary/src/bin/test_layout.c b/legacy/elementary/src/bin/test_layout.c
index 05bf3d710d..251b9c177a 100644
--- a/legacy/elementary/src/bin/test_layout.c
+++ b/legacy/elementary/src/bin/test_layout.c
@@ -14,7 +14,7 @@ _clicked_cb(void *data, Evas_Object *obj, void *event_info __UNUSED__)
void
test_layout(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *ly, *bt;
+ Evas_Object *win, *bg, *box, *ly, *bt;
char buf[PATH_MAX];
win = elm_win_add(NULL, "layout", ELM_WIN_BASIC);
@@ -26,11 +26,34 @@ test_layout(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_show(bg);
+ box = elm_box_add(win);
+ evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ elm_win_resize_object_add(win, box);
+ evas_object_show(box);
+
+ ly = elm_layout_add(win);
+ elm_layout_theme_set(ly, "layout", "application", "titlebar");
+ elm_layout_label_set(ly, "Some title");
+ elm_box_pack_end(box, ly);
+ evas_object_show(ly);
+
+ bt = elm_icon_add(win);
+ elm_icon_standard_set(bt, "chat");
+ evas_object_size_hint_min_set(bt, 20, 20);
+ elm_layout_icon_set(ly, bt);
+
+ bt = elm_icon_add(win);
+ elm_icon_standard_set(bt, "close");
+ evas_object_size_hint_min_set(bt, 20, 20);
+ elm_layout_end_set(ly, bt);
+
ly = elm_layout_add(win);
snprintf(buf, sizeof(buf), "%s/objects/test.edj", PACKAGE_DATA_DIR);
elm_layout_file_set(ly, buf, "layout");
evas_object_size_hint_weight_set(ly, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_win_resize_object_add(win, ly);
+ elm_box_pack_end(box, ly);
+ //elm_win_resize_object_add(win, ly);
evas_object_show(ly);
bt = elm_button_add(win);