summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrii Kroitor <an.kroitor@samsung.com>2014-11-13 00:14:57 +0900
committerDaniel Juyung Seo <seojuyung2@gmail.com>2014-11-13 00:14:57 +0900
commite3238f2251deded2009d9c688838fb3f9ca032c9 (patch)
treea37b0caf00c4123f93e760c27047c44a00224639
parent05436b2c6875174e1c739cffcbbecbf72cec20a6 (diff)
elm_box: inappropriate size_hint_align value usage fix
Summary: size_hint_align was used instead of evas_box's internal value for aligning of internal items. Because of that layout functions of elm_box and evas_box were incompatable Fixed elm_box, els_box layout and widgets that used this behaviour. @fix Test Plan: Run "elementary_test". All buttons should be left-aligned "elm_box_align_set(tbx2, 0.0, 0.5);" (test.c:332) Reviewers: cedric, Hermet, stefan_schmidt, seoz Reviewed By: seoz Subscribers: shilpasingh, reutskiy.v.v Differential Revision: https://phab.enlightenment.org/D1512
-rw-r--r--src/lib/elm_panel.c1
-rw-r--r--src/lib/elm_toolbar.c14
2 files changed, 7 insertions, 8 deletions
diff --git a/src/lib/elm_panel.c b/src/lib/elm_panel.c
index c2ef9c55d..31da9bcdc 100644
--- a/src/lib/elm_panel.c
+++ b/src/lib/elm_panel.c
@@ -959,7 +959,6 @@ _elm_panel_evas_object_smart_add(Eo *obj, Elm_Panel_Data *priv)
959 eo_do(obj, elm_obj_widget_theme_apply()); 959 eo_do(obj, elm_obj_widget_theme_apply());
960 960
961 priv->bx = evas_object_box_add(evas_object_evas_get(obj)); 961 priv->bx = evas_object_box_add(evas_object_evas_get(obj));
962 evas_object_size_hint_align_set(priv->bx, 0.5, 0.5);
963 evas_object_box_layout_set(priv->bx, _box_layout_cb, priv, NULL); 962 evas_object_box_layout_set(priv->bx, _box_layout_cb, priv, NULL);
964 evas_object_show(priv->bx); 963 evas_object_show(priv->bx);
965 964
diff --git a/src/lib/elm_toolbar.c b/src/lib/elm_toolbar.c
index 2bfdeb381..8ba4e3ca3 100644
--- a/src/lib/elm_toolbar.c
+++ b/src/lib/elm_toolbar.c
@@ -2757,7 +2757,7 @@ _elm_toolbar_evas_object_smart_add(Eo *obj, Elm_Toolbar_Data *priv)
2757 priv->align = 0.5; 2757 priv->align = 0.5;
2758 2758
2759 priv->bx = evas_object_box_add(evas_object_evas_get(obj)); 2759 priv->bx = evas_object_box_add(evas_object_evas_get(obj));
2760 evas_object_size_hint_align_set(priv->bx, priv->align, 0.5); 2760 evas_object_box_align_set(priv->bx, priv->align, 0.5);
2761 evas_object_box_layout_set(priv->bx, _layout, obj, NULL); 2761 evas_object_box_layout_set(priv->bx, _layout, obj, NULL);
2762 elm_widget_sub_object_add(obj, priv->bx); 2762 elm_widget_sub_object_add(obj, priv->bx);
2763 eo_do(obj, elm_interface_scrollable_content_set(priv->bx)); 2763 eo_do(obj, elm_interface_scrollable_content_set(priv->bx));
@@ -2775,7 +2775,7 @@ _elm_toolbar_evas_object_smart_add(Eo *obj, Elm_Toolbar_Data *priv)
2775 evas_object_show(priv->more); 2775 evas_object_show(priv->more);
2776 2776
2777 priv->bx_more = evas_object_box_add(evas_object_evas_get(obj)); 2777 priv->bx_more = evas_object_box_add(evas_object_evas_get(obj));
2778 evas_object_size_hint_align_set(priv->bx_more, priv->align, 0.5); 2778 evas_object_box_align_set(priv->bx_more, priv->align, 0.5);
2779 evas_object_box_layout_set(priv->bx_more, _layout, obj, NULL); 2779 evas_object_box_layout_set(priv->bx_more, _layout, obj, NULL);
2780 elm_widget_sub_object_add(obj, priv->bx_more); 2780 elm_widget_sub_object_add(obj, priv->bx_more);
2781 elm_layout_content_set 2781 elm_layout_content_set
@@ -2783,7 +2783,7 @@ _elm_toolbar_evas_object_smart_add(Eo *obj, Elm_Toolbar_Data *priv)
2783 evas_object_show(priv->bx_more); 2783 evas_object_show(priv->bx_more);
2784 2784
2785 priv->bx_more2 = evas_object_box_add(evas_object_evas_get(obj)); 2785 priv->bx_more2 = evas_object_box_add(evas_object_evas_get(obj));
2786 evas_object_size_hint_align_set(priv->bx_more2, priv->align, 0.5); 2786 evas_object_box_align_set(priv->bx_more2, priv->align, 0.5);
2787 evas_object_box_layout_set(priv->bx_more2, _layout, obj, NULL); 2787 evas_object_box_layout_set(priv->bx_more2, _layout, obj, NULL);
2788 elm_widget_sub_object_add(obj, priv->bx_more2); 2788 elm_widget_sub_object_add(obj, priv->bx_more2);
2789 elm_layout_content_set 2789 elm_layout_content_set
@@ -3453,12 +3453,12 @@ _elm_toolbar_align_set(Eo *obj EINA_UNUSED, Elm_Toolbar_Data *sd, double align)
3453 if (sd->vertical) 3453 if (sd->vertical)
3454 { 3454 {
3455 if (sd->align != align) 3455 if (sd->align != align)
3456 evas_object_size_hint_align_set(sd->bx, 0.5, align); 3456 evas_object_box_align_set(sd->bx, 0.5, align);
3457 } 3457 }
3458 else 3458 else
3459 { 3459 {
3460 if (sd->align != align) 3460 if (sd->align != align)
3461 evas_object_size_hint_align_set(sd->bx, align, 0.5); 3461 evas_object_box_align_set(sd->bx, align, 0.5);
3462 } 3462 }
3463 sd->align = align; 3463 sd->align = align;
3464} 3464}
@@ -3707,9 +3707,9 @@ _elm_toolbar_horizontal_set(Eo *obj, Elm_Toolbar_Data *sd, Eina_Bool horizontal)
3707 if (!horizontal == sd->vertical) return; 3707 if (!horizontal == sd->vertical) return;
3708 sd->vertical = !horizontal; 3708 sd->vertical = !horizontal;
3709 if (sd->vertical) 3709 if (sd->vertical)
3710 evas_object_size_hint_align_set(sd->bx, 0.5, sd->align); 3710 evas_object_box_align_set(sd->bx, 0.5, sd->align);
3711 else 3711 else
3712 evas_object_size_hint_align_set(sd->bx, sd->align, 0.5); 3712 evas_object_box_align_set(sd->bx, sd->align, 0.5);
3713 3713
3714 _sizing_eval(obj); 3714 _sizing_eval(obj);
3715} 3715}