diff options
author | David Walter Seikel | 2014-05-06 23:24:58 +1000 |
---|---|---|
committer | David Walter Seikel | 2014-05-06 23:24:58 +1000 |
commit | 12fcc3075e3eb035e3d7fefb30c1d087a312bc48 (patch) | |
tree | c9ecae7adcac2bd24aba3467f04bc6726ac10492 /src/libraries | |
parent | WinFangs use an Elm image instead of a rectangle for their background, and ot... (diff) | |
download | SledjHamr-12fcc3075e3eb035e3d7fefb30c1d087a312bc48.zip SledjHamr-12fcc3075e3eb035e3d7fefb30c1d087a312bc48.tar.gz SledjHamr-12fcc3075e3eb035e3d7fefb30c1d087a312bc48.tar.bz2 SledjHamr-12fcc3075e3eb035e3d7fefb30c1d087a312bc48.tar.xz |
All winFangs now get a complimentary box.
Diffstat (limited to 'src/libraries')
-rw-r--r-- | src/libraries/winFang.c | 9 | ||||
-rw-r--r-- | src/libraries/winFang.h | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/libraries/winFang.c b/src/libraries/winFang.c index c6b019a..a52d01c 100644 --- a/src/libraries/winFang.c +++ b/src/libraries/winFang.c | |||
@@ -163,6 +163,14 @@ winFang *winFangAdd(winFang *parent, int x, int y, int w, int h, char *title, ch | |||
163 | ); | 163 | ); |
164 | elm_win_resize_object_add(result->win, result->bg); | 164 | elm_win_resize_object_add(result->win, result->bg); |
165 | 165 | ||
166 | // Every window gets a free vertical box. | ||
167 | // TODO - Any widgets created without positon and size get packed to the end. | ||
168 | result->box = eo_add(ELM_OBJ_BOX_CLASS, result->win, | ||
169 | elm_obj_box_homogeneous_set(EINA_FALSE), | ||
170 | evas_obj_size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND), | ||
171 | evas_obj_size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL) | ||
172 | ); | ||
173 | elm_win_resize_object_add(result->win, result->box); | ||
166 | 174 | ||
167 | evas_object_resize(result->win, result->w, result->h); | 175 | evas_object_resize(result->win, result->w, result->h); |
168 | evas_object_show(result->win); | 176 | evas_object_show(result->win); |
@@ -177,6 +185,7 @@ void winFangDel(winFang *win) | |||
177 | 185 | ||
178 | if (!win) return; | 186 | if (!win) return; |
179 | 187 | ||
188 | eo_unref(win->box); | ||
180 | eo_unref(win->bg); | 189 | eo_unref(win->bg); |
181 | EINA_CLIST_FOR_EACH_ENTRY(wf, &win->winFangs, winFang, node) | 190 | EINA_CLIST_FOR_EACH_ENTRY(wf, &win->winFangs, winFang, node) |
182 | { | 191 | { |
diff --git a/src/libraries/winFang.h b/src/libraries/winFang.h index 93ff9b1..05c3036 100644 --- a/src/libraries/winFang.h +++ b/src/libraries/winFang.h | |||
@@ -19,6 +19,7 @@ typedef struct _winFang | |||
19 | { | 19 | { |
20 | Evas_Object *win; | 20 | Evas_Object *win; |
21 | Evas_Object *bg; | 21 | Evas_Object *bg; |
22 | Evas_Object *box; | ||
22 | Eina_Clist widgets; | 23 | Eina_Clist widgets; |
23 | Eina_Clist winFangs; | 24 | Eina_Clist winFangs; |
24 | int x, y, w, h; | 25 | int x, y, w, h; |