summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHermet Park <hermet@hermet.pe.kr>2016-02-11 22:48:44 +0900
committerHermet Park <hermet@hermet.pe.kr>2016-02-11 22:48:44 +0900
commita0eabea01dc6b1361092e8160ea7503e2c6189d8 (patch)
tree29b37d01227eb6d0db486b55013958d26457ba63
parent78a92a1ff74745d05154154f46cae1aa0c31c7dd (diff)
fix window size.
-rw-r--r--src/bin/etypers.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/bin/etypers.c b/src/bin/etypers.c
index 5f47e3f..821adca 100644
--- a/src/bin/etypers.c
+++ b/src/bin/etypers.c
@@ -744,16 +744,24 @@ _entry_create(Evas_Object *ly, const char *part, AppData *appdata)
744} 744}
745 745
746static Evas_Object * 746static Evas_Object *
747_win_create(int w, int h, AppData *appdata) 747_win_create(AppData *appdata)
748{ 748{
749 //Create a window
749 Evas_Object *win = elm_win_add(NULL, "EFL Typers", ELM_WIN_BASIC); 750 Evas_Object *win = elm_win_add(NULL, "EFL Typers", ELM_WIN_BASIC);
750 elm_win_title_set(win, "EFL Typers"); 751 elm_win_title_set(win, "EFL Typers");
751 elm_win_autodel_set(win, EINA_TRUE); 752 elm_win_autodel_set(win, EINA_TRUE);
753 elm_win_focus_highlight_enabled_set(win, EINA_FALSE);
752 evas_object_smart_callback_add(win, "delete,request", _win_del, appdata); 754 evas_object_smart_callback_add(win, "delete,request", _win_del, appdata);
753 evas_object_resize(win, w, h); 755 evas_object_resize(win, DEFAULT_WIN_W, DEFAULT_WIN_H);
754 evas_object_show(win); 756 evas_object_show(win);
755 evas_object_event_callback_add(win, EVAS_CALLBACK_RESIZE, 757 evas_object_event_callback_add(win, EVAS_CALLBACK_RESIZE,
756 _win_resize, appdata); 758 _win_resize, appdata);
759
760 //Fix the window size
761 Evas_Object *rect = evas_object_rectangle_add(evas_object_evas_get(win));
762 evas_object_size_hint_min_set(rect, DEFAULT_WIN_W, DEFAULT_WIN_H);
763 elm_win_resize_object_add(win, rect);
764
757 return win; 765 return win;
758} 766}
759 767
@@ -847,7 +855,7 @@ static void
847_app_init(AppData *appdata) 855_app_init(AppData *appdata)
848{ 856{
849 appdata->words_array = _words_create(); 857 appdata->words_array = _words_create();
850 appdata->win = _win_create(DEFAULT_WIN_W, DEFAULT_WIN_H, appdata); 858 appdata->win = _win_create(appdata);
851 appdata->ly = _layout_create(appdata->win, EDJE_PATH, "gui"); 859 appdata->ly = _layout_create(appdata->win, EDJE_PATH, "gui");
852 appdata->bx = _box_create(appdata->ly, "enemies"); 860 appdata->bx = _box_create(appdata->ly, "enemies");
853 appdata->entry = _entry_create(appdata->ly, "entry", appdata); 861 appdata->entry = _entry_create(appdata->ly, "entry", appdata);