efl_ui_tab_bar: fix tab sizing issue
authorBowon Ryu <bowon.ryu@samsung.com>
Thu, 31 Jan 2019 09:56:26 +0000 (18:56 +0900)
committerJongmin Lee <jm105.lee@samsung.com>
Wed, 6 Feb 2019 22:17:35 +0000 (07:17 +0900)
Summary:
The default value of hint_align has changed.
So change the hint_align of tab(layout) to HINT_FILL.

* Recently, the size_hint_fill API has been added,
  but currently tab_bar is not available because it uses evas_object_box.
* I plan to change evas_object_box to efl.ui.box in the future.

Test Plan: elementary_test -to efl.ui.tab_pager

Reviewers: Jaehyun_Cho, YOhoho

Reviewed By: Jaehyun_Cho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7835

src/lib/elementary/efl_ui_tab_bar.c

index 7d9f5c2..be9f8a1 100644 (file)
@@ -221,7 +221,12 @@ _tab_add(Eo *obj, const char *label, const char *icon)
    ti->tab = NULL;
    ti->label = eina_stringshare_add(label);
 
-   tab = efl_add(EFL_UI_LAYOUT_CLASS, obj);
+   tab = efl_add(EFL_UI_LAYOUT_CLASS, obj,
+                 efl_gfx_size_hint_align_set(efl_added, EVAS_HINT_FILL, EVAS_HINT_FILL));
+   /* FIXME: This is for tab sizing issue.
+    * Recently, the size_hint_fill API has been added,
+    * but currently tab_bar is not available because it uses evas_object_box.
+    * This should be removed after the box in tab_bar has been replaced by efl.ui.box */
 
    icon_obj = elm_icon_add(tab);