jackdanielz pushed a commit to branch master.


commit 36669f1eccc3b6c320fb4c4ecc0e029b95834f57
Author: Daniel Zaoui <daniel.za...@samsung.com>
Date:   Thu Mar 3 10:25:22 2016 +0200

    Scaling test: reorder instructions to set the correct scale
    If the scale is set on an object before contents are set, it will not
    pass to them. Because of this, in the test, scale of the first label
    remains 1.0, i.e the window scale, instead of 0.5.
    The patch modifies the order of the instructions by setting the scale
    after setting the label as content of the frame.
 src/bin/test_scaling.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/test_scaling.c b/src/bin/test_scaling.c
index d0d0f3c..84b20c6 100644
--- a/src/bin/test_scaling.c
+++ b/src/bin/test_scaling.c
@@ -76,7 +76,6 @@ test_scaling2(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event_
    fr = elm_frame_add(win);
-   elm_object_scale_set(fr, 0.5);
    elm_object_text_set(fr, "Scale: 0.5");
    lb = elm_label_add(win);
@@ -84,6 +83,7 @@ test_scaling2(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event_
                        "is 0.5. Child should<br/>"
                        "inherit it.");
    elm_object_content_set(fr, lb);
+   elm_object_scale_set(fr, 0.5);
    elm_box_pack_end(bx, fr);


Reply via email to