evas_object_move(sd->hit_rect, x, y);
}
-EOLIAN static void
-_elm_panel_evas_object_smart_resize(Eo *obj, Elm_Panel_Data *sd, Evas_Coord w, Evas_Coord h)
+static void
+_scrollable_layout_resize(Eo *obj, Elm_Panel_Data *sd, Evas_Coord w, Evas_Coord h)
{
- eo_do_super(obj, MY_CLASS, evas_obj_smart_resize(w, h));
-
- if (!sd->scrollable) return;
-
- evas_object_resize(sd->hit_rect, w, h);
-
switch (sd->orient)
{
case ELM_PANEL_ORIENT_TOP:
}
EOLIAN static void
+_elm_panel_evas_object_smart_resize(Eo *obj, Elm_Panel_Data *sd, Evas_Coord w, Evas_Coord h)
+{
+ eo_do_super(obj, MY_CLASS, evas_obj_smart_resize(w, h));
+
+ if (!sd->scrollable) return;
+
+ evas_object_resize(sd->hit_rect, w, h);
+
+ _scrollable_layout_resize(obj, sd, w, h);
+}
+
+EOLIAN static void
_elm_panel_evas_object_smart_member_add(Eo *obj, Elm_Panel_Data *sd, Evas_Object *member)
{
eo_do_super(obj, MY_CLASS, evas_obj_smart_member_add(member));
Evas_Coord w, h;
evas_object_geometry_get(obj, NULL, NULL, &w, &h);
- switch (sd->orient)
- {
- case ELM_PANEL_ORIENT_TOP:
- case ELM_PANEL_ORIENT_BOTTOM:
- // vertical
- evas_object_resize(sd->scr_ly, w, (1 + sd->content_size_ratio) * h);
- evas_object_size_hint_min_set(sd->scr_panel, w, (sd->content_size_ratio * h));
- evas_object_size_hint_min_set(sd->scr_event, w, h);
- break;
- case ELM_PANEL_ORIENT_LEFT:
- case ELM_PANEL_ORIENT_RIGHT:
- // horizontal
- evas_object_resize(sd->scr_ly, (1 + sd->content_size_ratio) * w, h);
- evas_object_size_hint_min_set(sd->scr_panel, (sd->content_size_ratio * w), h);
- evas_object_size_hint_min_set(sd->scr_event, w, h);
- break;
- }
-
- elm_layout_sizing_eval(obj);
+ _scrollable_layout_resize(obj, sd, w, h);
}
}