summaryrefslogtreecommitdiff
path: root/src/bin/e_widget_toolbar.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2015-01-01 17:29:25 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2015-01-01 17:45:34 -0500
commita11e8d5f2e64b09f19ecf77db4da5c4feca780a8 (patch)
treeb92a8fe1d442f167ea4a780a3056d149b66bfe75 /src/bin/e_widget_toolbar.c
parent41f4f28114d6c392fcaeff063da6b1710eaf2299 (diff)
e_box -> elm_box conversion
the next installment in the exciting adventure game Elementary Wars! happy new year from #teamborker
Diffstat (limited to 'src/bin/e_widget_toolbar.c')
-rw-r--r--src/bin/e_widget_toolbar.c34
1 files changed, 13 insertions, 21 deletions
diff --git a/src/bin/e_widget_toolbar.c b/src/bin/e_widget_toolbar.c
index 34ce1b5..dfe70c5 100644
--- a/src/bin/e_widget_toolbar.c
+++ b/src/bin/e_widget_toolbar.c
@@ -55,7 +55,7 @@ e_widget_toolbar_add(Evas *evas, int icon_w, int icon_h)
55 55
56 o = e_scrollframe_add(evas); 56 o = e_scrollframe_add(evas);
57 wd->o_base = o; 57 wd->o_base = o;
58 o = e_box_add(evas); 58 o = elm_box_add(o);
59 wd->o_box = o; 59 wd->o_box = o;
60 o = wd->o_base; 60 o = wd->o_base;
61 e_scrollframe_custom_theme_set(o, "base/theme/widgets", "e/widgets/toolbar"); 61 e_scrollframe_custom_theme_set(o, "base/theme/widgets", "e/widgets/toolbar");
@@ -82,8 +82,8 @@ e_widget_toolbar_add(Evas *evas, int icon_w, int icon_h)
82 e_widget_resize_object_set(obj, o); 82 e_widget_resize_object_set(obj, o);
83 83
84 o = wd->o_box; 84 o = wd->o_box;
85 e_box_orientation_set(o, 1); 85 elm_box_horizontal_set(o, 1);
86 e_box_homogenous_set(o, 1); 86 elm_box_homogeneous_set(o, 1);
87 e_scrollframe_child_set(wd->o_base, o); 87 e_scrollframe_child_set(wd->o_base, o);
88 e_widget_sub_object_add(obj, o); 88 e_widget_sub_object_add(obj, o);
89 evas_object_show(o); 89 evas_object_show(o);
@@ -158,16 +158,12 @@ e_widget_toolbar_item_append(Evas_Object *obj, Evas_Object *icon, const char *la
158 edje_object_part_text_set(o, "e.text.label", label); 158 edje_object_part_text_set(o, "e.text.label", label);
159 edje_object_size_min_calc(o, &mw, &mh); 159 edje_object_size_min_calc(o, &mw, &mh);
160 e_widget_sub_object_add(obj, o); 160 e_widget_sub_object_add(obj, o);
161 e_box_pack_end(wd->o_box, o); 161 evas_object_size_hint_min_set(o, mw, mh);
162 e_box_pack_options_set(o, 162 E_FILL(o);
163 1, 1, /* fill */ 163 elm_box_pack_end(wd->o_box, o);
164 0, 0, /* expand */
165 0.5, 0.5, /* align */
166 mw, mh, /* min */
167 9999, 9999 /* max */
168 );
169 evas_object_show(o); 164 evas_object_show(o);
170 e_box_size_min_get(wd->o_box, &mw, &mh); 165 elm_box_recalculate(wd->o_box);
166 evas_object_size_hint_min_get(wd->o_box, &mw, &mh);
171 evas_object_resize(wd->o_box, mw, mh); 167 evas_object_resize(wd->o_box, mw, mh);
172 evas_object_resize(wd->o_base, 500, 500); 168 evas_object_resize(wd->o_base, 500, 500);
173 e_scrollframe_child_viewport_size_get(wd->o_base, &vw, &vh); 169 e_scrollframe_child_viewport_size_get(wd->o_base, &vw, &vh);
@@ -235,13 +231,7 @@ e_widget_toolbar_item_label_set(Evas_Object *obj, int num, const char *label)
235 231
236 edje_object_part_text_set(it->o_base, "e.text.label", label); 232 edje_object_part_text_set(it->o_base, "e.text.label", label);
237 edje_object_size_min_calc(it->o_base, &mw, &mh); 233 edje_object_size_min_calc(it->o_base, &mw, &mh);
238 e_box_pack_options_set(it->o_base, 234 evas_object_size_hint_min_set(it->o_base, mw, mh);
239 1, 1, /* fill */
240 0, 0, /* expand */
241 0.5, 0.5, /* align */
242 mw, mh, /* min */
243 9999, 9999 /* max */
244 );
245 } 235 }
246} 236}
247 237
@@ -254,7 +244,8 @@ e_widget_toolbar_scrollable_set(Evas_Object *obj, Eina_Bool scrollable)
254 if (!obj) return; 244 if (!obj) return;
255 if (!(wd = e_widget_data_get(obj))) return; 245 if (!(wd = e_widget_data_get(obj))) return;
256 wd->scrollable = scrollable; 246 wd->scrollable = scrollable;
257 e_box_size_min_get(wd->o_box, &mw, &mh); 247 elm_box_recalculate(wd->o_box);
248 evas_object_size_hint_min_get(wd->o_box, &mw, &mh);
258 evas_object_resize(wd->o_box, mw, mh); 249 evas_object_resize(wd->o_box, mw, mh);
259 evas_object_resize(wd->o_base, 500, 500); 250 evas_object_resize(wd->o_base, 500, 500);
260 e_scrollframe_child_viewport_size_get(wd->o_base, &vw, &vh); 251 e_scrollframe_child_viewport_size_get(wd->o_base, &vw, &vh);
@@ -439,7 +430,8 @@ _e_wid_cb_scrollframe_resize(void *data, Evas *e __UNUSED__, Evas_Object *obj __
439 if ((!wd->o_base) || (!wd->o_box)) return; 430 if ((!wd->o_base) || (!wd->o_box)) return;
440 431
441 e_scrollframe_child_viewport_size_get(wd->o_base, &vw, &vh); 432 e_scrollframe_child_viewport_size_get(wd->o_base, &vw, &vh);
442 e_box_size_min_get(wd->o_box, &mw, &mh); 433 elm_box_recalculate(wd->o_box);
434 evas_object_size_hint_min_get(wd->o_box, &mw, &mh);
443 evas_object_geometry_get(wd->o_box, NULL, NULL, &w, &h); 435 evas_object_geometry_get(wd->o_box, NULL, NULL, &w, &h);
444 if (vw >= mw) 436 if (vw >= mw)
445 { 437 {