if (minh > rest_h)
rest_h = minh;
- if (sd->restricted_calc_w)
- rest_w = wd->w;
- if (sd->restricted_calc_h)
- rest_h = wd->h;
+ if (ld)
+ {
+ if (ld->restricted_calc_w)
+ rest_w = MIN(wd->w, rest_w);
+ if (ld->restricted_calc_h)
+ rest_h = MIN(wd->h, rest_w);
+ }
edje_object_size_min_restricted_calc(wd->resize_obj, &minw, &minh,
rest_w, rest_h);
if (ld)
{
+ ld->restricted_calc_w = ld->restricted_calc_h = EINA_FALSE;
efl_gfx_hint_size_min_set(obj, EINA_SIZE2D(minw, minh));
}
- sd->restricted_calc_w = sd->restricted_calc_h = EINA_FALSE;
}
void
EAPI void
elm_layout_sizing_restricted_eval(Eo *obj, Eina_Bool w, Eina_Bool h)
{
- Efl_Ui_Layout_Data *sd = efl_data_scope_safe_get(obj, MY_CLASS);
+ Elm_Layout_Data *ld = efl_data_scope_safe_get(obj, ELM_LAYOUT_MIXIN);
- if (!sd) return;
- sd->restricted_calc_w = !!w;
- sd->restricted_calc_h = !!h;
+ EINA_SAFETY_ON_NULL_RETURN(ld);
+ ld->restricted_calc_w = !!w;
+ ld->restricted_calc_h = !!h;
efl_canvas_group_change(obj);
}
unsigned int finger_size_multiplier_x, finger_size_multiplier_y; /**< multipliers for finger_size during group_calc */
- Eina_Bool restricted_calc_w : 1; /**< This is a flag to support edje restricted_calc in w axis. */
- Eina_Bool restricted_calc_h : 1; /**< This is a flag to support edje restricted_calc in y axis. */
Eina_Bool can_access : 1; /**< This is true when all text(including textblock) parts can be accessible by accessibility. */
Eina_Bool destructed_is : 1; /**< This flag indicates if Efl.Ui.Layout destructor was called. This is needed to avoid unnecessary calculation of subobject deletion during layout object's deletion. */
Eina_Bool file_set : 1; /**< This flag indicates if Efl.Ui.Layout source is set from a file*/
typedef struct _Elm_Layout_Data
{
Eina_Bool needs_size_calc : 1; /**< This flag is set true when the layout sizing eval is already requested. This defers sizing evaluation until smart calculation to avoid unnecessary calculation. */
+ Eina_Bool restricted_calc_w : 1; /**< This is a flag to support edje restricted_calc in w axis. */
+ Eina_Bool restricted_calc_h : 1; /**< This is a flag to support edje restricted_calc in y axis. */
} Elm_Layout_Data;
/**