summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorJaeun Choi <jaeun12.choi@samsung.com>2014-09-02 16:06:08 +0900
committerJaeun Choi <jaeun12.choi@samsung.com>2014-09-02 16:06:08 +0900
commita4f5e88ec0d35d5fa1369cd30dd58267b8b35e36 (patch)
treec9d51a5f8f88a4a57df8b26544e96c6def24ae3b /src/lib
parent480cccd967029b487ec44d1221371a90e43cd235 (diff)
panel: resize scrollable content in content_size_set API
in elm_panel_scrollable_content_size_set, not only update size ratio variable but also resize scrollable content @fix
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/elm_panel.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/lib/elm_panel.c b/src/lib/elm_panel.c
index c4ac45663..e1c8c0c43 100644
--- a/src/lib/elm_panel.c
+++ b/src/lib/elm_panel.c
@@ -1259,9 +1259,31 @@ _elm_panel_elm_widget_disable(Eo *obj, Elm_Panel_Data *sd)
1259} 1259}
1260 1260
1261EOLIAN static void 1261EOLIAN static void
1262_elm_panel_scrollable_content_size_set(Eo *obj EINA_UNUSED, Elm_Panel_Data *sd, double ratio) 1262_elm_panel_scrollable_content_size_set(Eo *obj, Elm_Panel_Data *sd, double ratio)
1263{ 1263{
1264 Evas_Coord w, h;
1264 sd->content_size_ratio = ratio; 1265 sd->content_size_ratio = ratio;
1266 evas_object_geometry_get(obj, NULL, NULL, &w, &h);
1267
1268 switch (sd->orient)
1269 {
1270 case ELM_PANEL_ORIENT_TOP:
1271 case ELM_PANEL_ORIENT_BOTTOM:
1272 // vertical
1273 evas_object_resize(sd->scr_ly, w, (1 + sd->content_size_ratio) * h);
1274 evas_object_size_hint_min_set(sd->scr_panel, w, (sd->content_size_ratio * h));
1275 evas_object_size_hint_min_set(sd->scr_event, w, h);
1276 break;
1277 case ELM_PANEL_ORIENT_LEFT:
1278 case ELM_PANEL_ORIENT_RIGHT:
1279 // horizontal
1280 evas_object_resize(sd->scr_ly, (1 + sd->content_size_ratio) * w, h);
1281 evas_object_size_hint_min_set(sd->scr_panel, (sd->content_size_ratio * w), h);
1282 evas_object_size_hint_min_set(sd->scr_event, w, h);
1283 break;
1284 }
1285
1286 ecore_animator_add(_elm_panel_anim_cb, obj);
1265} 1287}
1266 1288
1267EOLIAN static void 1289EOLIAN static void