diff options
author | Jaehyun Cho <jae_hyun.cho@samsung.com> | 2015-03-13 17:27:03 +0900 |
---|---|---|
committer | Jaehyun Cho <jae_hyun.cho@samsung.com> | 2015-03-18 13:41:48 +0900 |
commit | 71797204069ea222edfd9e937c762685122c0160 (patch) | |
tree | 503b93b56bfa3b04be869fa6bb54409304f514fa | |
parent | e01f432732be488112a8110eb96a899d2427333c (diff) | |
download | elementary-71797204069ea222edfd9e937c762685122c0160.tar.gz |
elm_panel: Fix incorrect scroller content region calculation of panel.
Summary:
Fix incorrect scroller content region calculation of panel.
It is fixed that the parent of panel content becomes scr_ly if panel is scrollable.
@fix
Test Plan:
Test Panel Scrollable in elementary_test.
1. Change panel orient as ELM_PANEL_ORIENT_RIGHT in test_panel.c.
2. Run elementary_test and test Panel Scrollable.
3. You can see the right panel drawer is hidden right after it is shown.
(After applying this patch, this problem will be resolved.)
Reviewers: seoz, woohyun, eunue, Hermet
Reviewed By: Hermet
Differential Revision: https://phab.enlightenment.org/D2125
-rw-r--r-- | src/lib/elm_panel.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/elm_panel.c b/src/lib/elm_panel.c index ebe43c9d7..28af02f9f 100644 --- a/src/lib/elm_panel.c +++ b/src/lib/elm_panel.c @@ -886,6 +886,8 @@ _elm_panel_elm_container_content_set(Eo *obj, Elm_Panel_Data *sd, const char *pa { evas_object_box_append(sd->bx, sd->content); evas_object_show(sd->content); + if (sd->scrollable) + elm_widget_sub_object_add(sd->scr_ly, sd->content); } elm_layout_sizing_eval(obj); @@ -940,6 +942,8 @@ _elm_panel_elm_container_content_unset(Eo *obj, Elm_Panel_Data *sd, const char * ret = sd->content; evas_object_box_remove_all(sd->bx, EINA_FALSE); + if (sd->scrollable) + elm_widget_sub_object_del(sd->scr_ly, sd->content); sd->content = NULL; return ret; @@ -1384,6 +1388,7 @@ _elm_panel_scrollable_set(Eo *obj, Elm_Panel_Data *sd, Eina_Bool scrollable) elm_interface_scrollable_content_set(sd->scr_ly)); sd->freeze = EINA_TRUE; elm_layout_content_set(sd->scr_ly, "elm.swallow.content", sd->bx); + if (sd->content) elm_widget_sub_object_add(sd->scr_ly, sd->content); switch (sd->orient) { @@ -1432,6 +1437,7 @@ _elm_panel_scrollable_set(Eo *obj, Elm_Panel_Data *sd, Eina_Bool scrollable) elm_layout_content_unset(sd->scr_ly, "elm.swallow.content"); elm_layout_content_set(obj, "elm.swallow.content", sd->bx); + if (sd->content) elm_widget_sub_object_add(sd->bx, sd->content); } } |