summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaehyun Cho <jae_hyun.cho@samsung.com>2015-03-13 17:27:03 +0900
committerJaehyun Cho <jae_hyun.cho@samsung.com>2015-03-13 17:28:17 +0900
commit8ee8864bdc8615602e7ed45341092d26e5e76627 (patch)
treef0dc38568065107d0f6669789a88d74aa19fd0d3
parent3dfaf653721dec7f5b1dd55a11471d73f7fc5053 (diff)
downloadelementary-8ee8864bdc8615602e7ed45341092d26e5e76627.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. 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.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/elm_panel.c b/src/lib/elm_panel.c
index a8da6a8c6..733386fa4 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);
}
}