edje: Fix issue with width calculation and padding 27/67827/1
authorMinwoo, Lee <minwoo47.lee@samsung.com>
Thu, 28 Apr 2016 11:16:07 +0000 (20:16 +0900)
committerMinwoo, Lee <minwoo47.lee@samsung.com>
Thu, 28 Apr 2016 11:33:55 +0000 (20:33 +0900)
commit2b7bef8b8f3471a1e97db5e597e77d5dd597f952
treec52eed544da16b4320c24a676edfcce8bb22e39b
parentc6b0419bbdcb14ec545632f6d865b6d4067cc2a8
edje: Fix issue with width calculation and padding
This patch is from opensource (acab227544b7903ed6c267f022ebc389246e9ccc)

    Summary:
    The size of the style pad isn't considered when the min value of the
    textblock is calculated.  In case of putting the lable that there is an
    outline in the box, the letter is cut.  So, I revised so that
    evas_object_textblock_style_insets_get could be called after a
    evas_object_textblock_size_formatted_get in
    _edje_object_size_min_restricted_calc function.  And then the style pad was
    considered in the result value of the edje_object_size_min_calc.

    @fix

    Test Plan:

    EAPI_MAIN int
    elm_main(int argc, char **argv)
    {
       Evas_Object *box, *label;
       Evas_Object *win;

       elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);

       win = elm_win_util_standard_add("Font", "FONT");
       elm_win_autodel_set(win, EINA_TRUE);

       box = elm_box_add(win);
       elm_box_padding_set(box, 10, 0);
       elm_box_align_set(box, 1, 0.5);
       evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
       evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
       elm_win_resize_object_add(win, box);
       evas_object_show(box);

       label = elm_label_add(box);
       elm_object_text_set(label, "<font=default align=rignt color=#ffffff font_size=200 style=soft_outline outline_color=#ff0000ff>label");
       elm_box_pack_end(box, label);
       evas_object_show(label);

       evas_object_resize(win, 500, 300);
       evas_object_show(win);
       elm_run();

       return 0;
    }
    ELM_MAIN();

Signed-off-by: Minwoo, Lee <minwoo47.lee@samsung.com>
Change-Id: I5ca56206064233698ca9802c761bf94320381dfb
src/lib/edje/edje_util.c