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)
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
886 { 886 {
887 evas_object_box_append(sd->bx, sd->content); 887 evas_object_box_append(sd->bx, sd->content);
888 evas_object_show(sd->content); 888 evas_object_show(sd->content);
889 if (sd->scrollable)
890 elm_widget_sub_object_add(sd->scr_ly, sd->content);
889 } 891 }
890 892
891 elm_layout_sizing_eval(obj); 893 elm_layout_sizing_eval(obj);
@@ -940,6 +942,8 @@ _elm_panel_elm_container_content_unset(Eo *obj, Elm_Panel_Data *sd, const char *
940 ret = sd->content; 942 ret = sd->content;
941 943
942 evas_object_box_remove_all(sd->bx, EINA_FALSE); 944 evas_object_box_remove_all(sd->bx, EINA_FALSE);
945 if (sd->scrollable)
946 elm_widget_sub_object_del(sd->scr_ly, sd->content);
943 sd->content = NULL; 947 sd->content = NULL;
944 948
945 return ret; 949 return ret;
@@ -1384,6 +1388,7 @@ _elm_panel_scrollable_set(Eo *obj, Elm_Panel_Data *sd, Eina_Bool scrollable)
1384 elm_interface_scrollable_content_set(sd->scr_ly)); 1388 elm_interface_scrollable_content_set(sd->scr_ly));
1385 sd->freeze = EINA_TRUE; 1389 sd->freeze = EINA_TRUE;
1386 elm_layout_content_set(sd->scr_ly, "elm.swallow.content", sd->bx); 1390 elm_layout_content_set(sd->scr_ly, "elm.swallow.content", sd->bx);
1391 if (sd->content) elm_widget_sub_object_add(sd->scr_ly, sd->content);
1387 1392
1388 switch (sd->orient) 1393 switch (sd->orient)
1389 { 1394 {
@@ -1432,6 +1437,7 @@ _elm_panel_scrollable_set(Eo *obj, Elm_Panel_Data *sd, Eina_Bool scrollable)
1432 1437
1433 elm_layout_content_unset(sd->scr_ly, "elm.swallow.content"); 1438 elm_layout_content_unset(sd->scr_ly, "elm.swallow.content");
1434 elm_layout_content_set(obj, "elm.swallow.content", sd->bx); 1439 elm_layout_content_set(obj, "elm.swallow.content", sd->bx);
1440 if (sd->content) elm_widget_sub_object_add(sd->bx, sd->content);
1435 } 1441 }
1436} 1442}
1437 1443