elm_widget_can_focus_set(obj, EINA_TRUE);
priv->panel_edje = wd->resize_obj;
+ // TIZEN_ONLY(20170105): scrollable panel content size ratio refactoring (for 2.4 UX)
+ if ((elm_win_rotation_get(elm_widget_top_get(obj)) == 90) || (elm_win_rotation_get(elm_widget_top_get(obj)) == 270))
+ priv->content_size_ratio = 0.45;
+ else
+ priv->content_size_ratio = 0.80;
+ //
eo_do(obj, elm_obj_widget_theme_apply());
eo_do_super(obj, MY_CLASS, evas_obj_smart_del());
}
-// TIZEN_ONLY(20150128): Panel implementation merge into 2.4
-EOLIAN static void
-_elm_panel_elm_widget_orientation_set(Eo *obj, Elm_Panel_Data *sd EINA_UNUSED, int orient_mode)
-{
- eo_do_super(obj, MY_CLASS, elm_obj_widget_orientation_set(orient_mode));
- if (orient_mode == 90 || orient_mode == 270)
- elm_panel_scrollable_content_size_set(obj, 0.45);
- else
- elm_panel_scrollable_content_size_set(obj, 0.80);
-}
-////////////////////////////////////////////////////////////
-
EOLIAN static void
_elm_panel_evas_object_smart_move(Eo *obj, Elm_Panel_Data *sd, Evas_Coord x, Evas_Coord y)
{
if (sd->hit_rect) evas_object_raise(sd->hit_rect);
}
+// TIZEN_ONLY(20170105): scrollable panel content size ratio refactoring (for 2.4 UX)
+EOLIAN static void
+_elm_panel_elm_widget_orientation_set(Eo *obj, Elm_Panel_Data *sd, int orient_mode)
+{
+ eo_do_super(obj, MY_CLASS, elm_obj_widget_orientation_set(orient_mode));
+
+ if (!sd->content_size_manual_set)
+ {
+ if (orient_mode == 90 || orient_mode == 270)
+ sd->content_size_ratio = 0.45;
+ else
+ sd->content_size_ratio = 0.80;
+ }
+
+ if (sd->scrollable)
+ {
+ Evas_Coord w, h;
+ evas_object_geometry_get(obj, NULL, NULL, &w, &h);
+
+ _scrollable_layout_resize(obj, sd, w, h);
+ }
+}
+//
+
EOLIAN static void
_elm_panel_elm_widget_access(Eo *obj, Elm_Panel_Data *_pd, Eina_Bool is_access)
{
elm_layout_signal_emit(sd->scr_ly, "elm,state,content,hidden", "elm");
}
- elm_panel_scrollable_content_size_set(obj, sd->content_size_ratio);
+ // TIZEN_ONLY(20170105): scrollable panel content size ratio refactoring (for 2.4 UX)
+ //elm_panel_scrollable_content_size_set(obj, sd->content_size_ratio);
+ Evas_Coord w, h;
+ evas_object_geometry_get(obj, NULL, NULL, &w, &h);
+
+ _scrollable_layout_resize(obj, sd, w, h);
+ //
}
else
_orient_set_do(obj);
else if (ratio > 1.0) ratio = 1.0;
sd->content_size_ratio = ratio;
+ // TIZEN_ONLY(20170105): scrollable panel content size ratio refactoring (for 2.4 UX)
+ sd->content_size_manual_set = EINA_TRUE;
+ //
if (sd->scrollable)
{
elm_widget_resize_object_set(obj, sd->scr_edje, EINA_TRUE);
- // TIZEN_ONLY(20150128): Panel implementation merge into 2.4
- if (elm_win_rotation_get(elm_widget_top_get(obj)) == 90 || elm_win_rotation_get(elm_widget_top_get(obj)) == 270)
- elm_panel_scrollable_content_size_set(obj, 0.45);
- else
- elm_panel_scrollable_content_size_set(obj, 0.80);
- ////////////////////////////////////////////////////////////
-
if (!sd->hit_rect)
{
sd->hit_rect = evas_object_rectangle_add(evas_object_evas_get(obj));
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);
+ // TIZEN_ONLY(20170105): scrollable panel content size ratio refactoring (for 2.4 UX)
+ Evas_Coord w, h;
+ evas_object_geometry_get(obj, NULL, NULL, &w, &h);
+
+ _scrollable_layout_resize(obj, sd, w, h);
+ //
+
switch (sd->orient)
{
case ELM_PANEL_ORIENT_TOP: