if (sd->no_scale)
_efl_ui_image_internal_scale_set(obj, sd, 1.0);
else
- _efl_ui_image_internal_scale_set(obj, sd, elm_widget_scale_get(obj) * elm_config_scale_get());
+ _efl_ui_image_internal_scale_set(obj, sd, efl_ui_scale_get(obj) * elm_config_scale_get());
ts = sd->scale;
sd->scale = 1.0;
if (_is_horizontal(sd->orientation))
evas_object_size_hint_min_set
- (sd->spacer, (double)sd->size * elm_widget_scale_get(obj) *
+ (sd->spacer, (double)sd->size * efl_ui_scale_get(obj) *
elm_config_scale_get(), 1);
else
evas_object_size_hint_min_set
- (sd->spacer, 1, (double)sd->size * elm_widget_scale_get(obj) *
+ (sd->spacer, 1, (double)sd->size * efl_ui_scale_get(obj) *
elm_config_scale_get());
if (_is_inverted(sd->orientation))
if (_is_horizontal(sd->orientation))
evas_object_size_hint_min_set
- (sd->spacer, (double)sd->size * elm_widget_scale_get(obj) *
+ (sd->spacer, (double)sd->size * efl_ui_scale_get(obj) *
elm_config_scale_get(), 1);
else
evas_object_size_hint_min_set
- (sd->spacer, 1, (double)sd->size * elm_widget_scale_get(obj) *
+ (sd->spacer, 1, (double)sd->size * efl_ui_scale_get(obj) *
elm_config_scale_get());
elm_layout_sizing_eval(obj);
edje_object_scale_set
(wd->resize_obj,
- elm_widget_scale_get(obj) * elm_config_scale_get());
+ efl_ui_scale_get(obj) * elm_config_scale_get());
_mirrored_set(obj, elm_widget_mirrored_get(obj));
edje_object_mirrored_set(sd->legacy.edje, elm_widget_mirrored_get(obj));
edje_object_scale_set(sd->legacy.edje,
- elm_widget_scale_get(obj) * elm_config_scale_get());
+ efl_ui_scale_get(obj) * elm_config_scale_get());
efl_event_callback_legacy_call(obj, EFL_UI_WIN_EVENT_THEME_CHANGED, NULL);
ret = elm_obj_widget_disable(obj);
if (str) hpad = atoi(str);
str = elm_layout_data_get(obj, "vertical_pad");
if (str) vpad = atoi(str);
- pad_scale = elm_widget_scale_get(obj) * elm_config_scale_get()
+ pad_scale = efl_ui_scale_get(obj) * elm_config_scale_get()
/ edje_object_base_scale_get(elm_layout_edje_get(obj));
elm_box_padding_set(sd->box, (hpad * pad_scale), (vpad * pad_scale));
if (str) hpad = atoi(str);
str = elm_layout_data_get(obj, "vertical_pad");
if (str) vpad = atoi(str);
- pad_scale = elm_widget_scale_get(obj) * elm_config_scale_get()
+ pad_scale = efl_ui_scale_get(obj) * elm_config_scale_get()
/ edje_object_base_scale_get(elm_layout_edje_get(obj));
elm_box_padding_set(sd->box, (hpad * pad_scale), (vpad * pad_scale));
}
edje_object_scale_set
- (wd->resize_obj, elm_widget_scale_get(obj) *
+ (wd->resize_obj, efl_ui_scale_get(obj) *
elm_config_scale_get());
for (i = 0; i < 6; i++)
elm_widget_theme_object_set
(obj, sd->digit[i], "clock", "flipdigit", style);
edje_object_scale_set
- (sd->digit[i], elm_widget_scale_get(obj) *
+ (sd->digit[i], efl_ui_scale_get(obj) *
elm_config_scale_get());
if ((sd->edit) && (sd->digedit & (1 << i)))
edje_object_add(evas_object_evas_get(wd->resize_obj));
elm_widget_theme_object_set
(obj, sd->am_pm_obj, "clock", "flipampm", style);
- edje_object_scale_set(sd->am_pm_obj, elm_widget_scale_get(obj) *
+ edje_object_scale_set(sd->am_pm_obj, efl_ui_scale_get(obj) *
_elm_config->scale);
if (sd->edit)
edje_object_signal_emit
(wd->resize_obj, "vertical_pad");
if (vpadstr) v_pad = atoi(vpadstr);
- scale = elm_widget_scale_get(obj) * elm_config_scale_get() / edje_object_base_scale_get(wd->resize_obj);
+ scale = efl_ui_scale_get(obj) * elm_config_scale_get() / edje_object_base_scale_get(wd->resize_obj);
efl_pack_padding_set(sd->palette_box, h_pad * scale, v_pad * scale, 0);
EINA_LIST_FOREACH(sd->items, elist, eo_item)
vpadstr = edje_object_data_get(wd->resize_obj, "vertical_pad");
if (vpadstr) v_pad = atoi(vpadstr);
- scale = elm_widget_scale_get(obj) * elm_config_scale_get() / edje_object_base_scale_get(wd->resize_obj);
+ scale = efl_ui_scale_get(obj) * elm_config_scale_get() / edje_object_base_scale_get(wd->resize_obj);
efl_pack_padding_set(sd->palette_box, h_pad * scale, v_pad * scale, 0);
efl_pack_align_set(sd->palette_box, 0.0, 0.0);
if (!elm_layout_content_set(obj, "elm.palette", sd->palette_box))
edje_object_scale_set
(wd->resize_obj,
- elm_widget_scale_get(obj) * elm_config_scale_get());
+ efl_ui_scale_get(obj) * elm_config_scale_get());
_mirrored_set(obj, elm_widget_mirrored_get(obj));
edje_object_mirrored_set(VIEW(it),
elm_widget_mirrored_get(WIDGET(it)));
edje_object_scale_set(VIEW(it),
- elm_widget_scale_get(WIDGET(it))
+ efl_ui_scale_get(WIDGET(it))
* elm_config_scale_get());
evas_object_hide(itc->base_view);
}
edje_object_mirrored_set(view, elm_widget_mirrored_get(WIDGET(it)));
- edje_object_scale_set(view, elm_widget_scale_get(WIDGET(it)) *
+ edje_object_scale_set(view, efl_ui_scale_get(WIDGET(it)) *
elm_config_scale_get());
evas_object_stack_below(view, sd->stack);
}
Evas_Object *view = edje_object_add(evas_object_evas_get(WIDGET(it)));
evas_object_smart_member_add(view, GG_IT(it)->wsd->pan_obj);
elm_widget_sub_object_add(WIDGET(it), view);
- edje_object_scale_set(view, elm_widget_scale_get(WIDGET(it)) *
+ edje_object_scale_set(view, efl_ui_scale_get(WIDGET(it)) *
elm_config_scale_get());
_view_style_update(it, view, style);
}
edje_object_mirrored_set(view, elm_widget_mirrored_get(WIDGET(it)));
- edje_object_scale_set(view, elm_widget_scale_get(WIDGET(it))
+ edje_object_scale_set(view, efl_ui_scale_get(WIDGET(it))
* elm_config_scale_get());
stacking_even = edje_object_data_get(view, "stacking_even");
Evas_Object *view = edje_object_add(evas_object_evas_get(WIDGET(it)));
evas_object_smart_member_add(view, it->item->wsd->pan_obj);
elm_widget_sub_object_add(WIDGET(it), view);
- edje_object_scale_set(view, elm_widget_scale_get(WIDGET(it)) *
+ edje_object_scale_set(view, efl_ui_scale_get(WIDGET(it)) *
elm_config_scale_get());
_view_style_update(it, view, style);
if (it->item->decorate_all_item_realized) return;
it->deco_all_view = edje_object_add(evas_object_evas_get(WIDGET(it)));
- edje_object_scale_set(it->deco_all_view, elm_widget_scale_get(WIDGET(it)) *
+ edje_object_scale_set(it->deco_all_view, efl_ui_scale_get(WIDGET(it)) *
elm_config_scale_get());
evas_object_smart_member_add(it->deco_all_view, sd->pan_obj);
elm_widget_sub_object_add(WIDGET(it), it->deco_all_view);
edje_object_mirrored_set(itc->base_view,
elm_widget_mirrored_get(WIDGET(it)));
edje_object_scale_set(itc->base_view,
- elm_widget_scale_get(WIDGET(it))
+ efl_ui_scale_get(WIDGET(it))
* elm_config_scale_get());
it->spacer = NULL;
* This function disables scaling of the elm_image widget through the function
* elm_object_scale_set(). However, this does not affect the widget size/resize
* in any way. For that effect, take a look at @ref elm_image_resizable_get and
- * @ref elm_widget_scale_get
+ * @ref efl_ui_scale_get
*
* @param[in] no_scale @c true if the object is not scalable, @c false
* otherwise. Default is @c false.
* This function disables scaling of the elm_image widget through the function
* elm_object_scale_set(). However, this does not affect the widget size/resize
* in any way. For that effect, take a look at @ref elm_image_resizable_get and
- * @ref elm_widget_scale_get
+ * @ref efl_ui_scale_get
*
* @return @c true if the object is not scalable, @c false otherwise. Default
* is @c false.
edje_object_scale_set
(wd->resize_obj,
- elm_widget_scale_get(obj) * elm_config_scale_get());
+ efl_ui_scale_get(obj) * elm_config_scale_get());
_elm_layout_highlight_in_theme(obj);
{
ELM_LIST_ITEM_DATA_GET(eo_it, it);
edje_object_scale_set
- (VIEW(it), elm_widget_scale_get(obj) * elm_config_scale_get());
+ (VIEW(it), efl_ui_scale_get(obj) * elm_config_scale_get());
it->fixed = EINA_FALSE;
}
double scale)
{
EINA_SAFETY_ON_NULL_RETURN(obj);
- elm_widget_scale_set(obj, scale);
+ efl_ui_scale_set(obj, scale);
}
EAPI double
elm_object_scale_get(const Evas_Object *obj)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, 0.0);
- return elm_widget_scale_get(obj);
+ return efl_ui_scale_get(obj);
}
EAPI void
elm_wdg_item_disable(eo_item);
/* SEOZ
edje_object_scale_set
- (VIEW(item), elm_widget_scale_get(obj) *
+ (VIEW(item), efl_ui_scale_get(obj) *
elm_config_scale_get());
*/
}
if (sd->block_events) _block_events_theme_apply(obj);
edje_object_scale_set
- (sd->notify, elm_widget_scale_get(obj) * elm_config_scale_get());
+ (sd->notify, efl_ui_scale_get(obj) * elm_config_scale_get());
_sizing_eval(obj);
if (sd->size <= 0) return;
- scale = (sd->size * elm_widget_scale_get(obj) * elm_config_scale_get());
+ scale = (sd->size * efl_ui_scale_get(obj) * elm_config_scale_get());
evas_object_size_hint_min_set(sd->icon, scale, scale);
elm_coords_finger_size_adjust(1, &minw, 1, &minh);
(obj, wd->resize_obj, "photo", "base",
elm_widget_style_get(obj));
- elm_object_scale_set(sd->icon, elm_widget_scale_get(obj));
+ elm_object_scale_set(sd->icon, efl_ui_scale_get(obj));
edje_object_scale_set(wd->resize_obj,
- elm_widget_scale_get(obj) * elm_config_scale_get());
+ efl_ui_scale_get(obj) * elm_config_scale_get());
_sizing_eval(obj);
return int_ret;
elm_image_fill_outside_set(priv->icon, !priv->fill_inside);
elm_image_prescale_set(priv->icon, 0);
- elm_object_scale_set(priv->icon, elm_widget_scale_get(obj));
+ elm_object_scale_set(priv->icon, efl_ui_scale_get(obj));
evas_object_event_callback_add
(priv->icon, EVAS_CALLBACK_MOUSE_UP, _mouse_up, obj);
elm_widget_theme_object_set
(obj, VIEW(it), "segment_control", "item",
elm_widget_style_get(obj));
- edje_object_scale_set(VIEW(it), elm_widget_scale_get(WIDGET(it)) *
+ edje_object_scale_set(VIEW(it), efl_ui_scale_get(WIDGET(it)) *
elm_config_scale_get());
edje_object_mirrored_set(VIEW(it), rtl);
}
parent = efl_parent_get(obj);
VIEW(it) = edje_object_add(evas_object_evas_get(parent));
- edje_object_scale_set(VIEW(it),elm_widget_scale_get(WIDGET(it)) *
+ edje_object_scale_set(VIEW(it),efl_ui_scale_get(WIDGET(it)) *
elm_config_scale_get());
evas_object_smart_member_add(VIEW(it), parent);
_elm_theme_set(elm_widget_theme_get(obj), *popup, "slider", "horizontal/popup", elm_widget_style_get(obj));
else
_elm_theme_set(elm_widget_theme_get(obj), *popup, "slider", "vertical/popup", elm_widget_style_get(obj));
- edje_object_scale_set(*popup, elm_widget_scale_get(obj) *
+ edje_object_scale_set(*popup, efl_ui_scale_get(obj) *
elm_config_scale_get());
edje_object_signal_callback_add(*popup, "popup,hide,done", "elm", // XXX: for compat
_popup_hide_done, obj);
if (sd->popup)
{
- edje_object_scale_set(sd->popup, elm_widget_scale_get(obj) *
+ edje_object_scale_set(sd->popup, efl_ui_scale_get(obj) *
elm_config_scale_get());
if (sd->range_enable && sd->popup2)
- edje_object_scale_set(sd->popup2, elm_widget_scale_get(obj) *
+ edje_object_scale_set(sd->popup2, efl_ui_scale_get(obj) *
elm_config_scale_get());
else if (sd->range_enable && !sd->popup2)
_popup_add(sd, obj, &sd->popup2, &sd->track2, EINA_TRUE);
if (_is_horizontal(sd->orientation))
evas_object_size_hint_min_set
- (sd->spacer, (double)sd->size * elm_widget_scale_get(obj) *
+ (sd->spacer, (double)sd->size * efl_ui_scale_get(obj) *
elm_config_scale_get(), 1);
else
evas_object_size_hint_min_set
- (sd->spacer, 1, (double)sd->size * elm_widget_scale_get(obj) *
+ (sd->spacer, 1, (double)sd->size * efl_ui_scale_get(obj) *
elm_config_scale_get());
if (sd->range_enable)
if (_is_horizontal(sd->orientation))
evas_object_size_hint_min_set
- (sd->spacer, (double)sd->size * elm_widget_scale_get(obj) *
+ (sd->spacer, (double)sd->size * efl_ui_scale_get(obj) *
elm_config_scale_get(), 1);
else
evas_object_size_hint_min_set
- (sd->spacer, 1, (double)sd->size * elm_widget_scale_get(obj) *
+ (sd->spacer, 1, (double)sd->size * efl_ui_scale_get(obj) *
elm_config_scale_get());
_val_fetch(obj, EINA_FALSE);
(wd->resize_obj, "icon_size");
if (icon_size)
- return (int)(atoi(icon_size) * elm_widget_scale_get(obj) * elm_config_scale_get()
+ return (int)(atoi(icon_size) * efl_ui_scale_get(obj) * elm_config_scale_get()
/ edje_object_base_scale_get(wd->resize_obj));
return _elm_config->icon_size;
if (sd->priv_icon_size) sd->icon_size = sd->priv_icon_size;
else sd->icon_size = sd->theme_icon_size;
- scale = (elm_widget_scale_get(obj) * elm_config_scale_get());
+ scale = (efl_ui_scale_get(obj) * elm_config_scale_get());
EINA_INLIST_FOREACH(sd->items, it)
_item_theme_hook(obj, it, scale, sd->icon_size);
if (item->object)
elm_widget_sub_object_add(obj, item->object);
- scale = (elm_widget_scale_get(obj) * elm_config_scale_get());
+ scale = (efl_ui_scale_get(obj) * elm_config_scale_get());
_item_theme_hook(obj, item, scale, sd->icon_size);
}
_elm_widget_sub_object_redirect_to_top(obj, item->object);
o = item->object;
item->object = NULL;
- scale = (elm_widget_scale_get(obj) * elm_config_scale_get());
+ scale = (efl_ui_scale_get(obj) * elm_config_scale_get());
_item_theme_hook(obj, item, scale, sd->icon_size);
return o;
it = _item_new(obj, icon, label, func, data);
if (!it) return NULL;
- scale = (elm_widget_scale_get(obj) * elm_config_scale_get());
+ scale = (efl_ui_scale_get(obj) * elm_config_scale_get());
prev_list = evas_object_box_children_get(sd->bx);
it = _item_new(obj, icon, label, func, data);
if (!it) return NULL;
- scale = (elm_widget_scale_get(obj) * elm_config_scale_get());
+ scale = (efl_ui_scale_get(obj) * elm_config_scale_get());
prev_list = evas_object_box_children_get(sd->bx);
it = _item_new(obj, icon, label, func, data);
if (!it) return NULL;
- scale = (elm_widget_scale_get(obj) * elm_config_scale_get());
+ scale = (efl_ui_scale_get(obj) * elm_config_scale_get());
prev_list = evas_object_box_children_get(sd->bx);
it = _item_new(obj, icon, label, func, data);
if (!it) return NULL;
- scale = (elm_widget_scale_get(obj) * elm_config_scale_get());
+ scale = (efl_ui_scale_get(obj) * elm_config_scale_get());
prev_list = evas_object_box_children_get(sd->bx);
if (item->separator == separator) return;
item->separator = separator;
- scale = (elm_widget_scale_get(obj) * elm_config_scale_get());
+ scale = (efl_ui_scale_get(obj) * elm_config_scale_get());
_item_theme_hook(obj, item, scale, sd->icon_size);
evas_object_size_hint_min_set(VIEW(item), -1, -1);
if (separator) sd->separator_count++;
* need to reset sobj's scale to 5.
* Note that each widget's scale is 0 by default.
*/
- double scale, pscale = elm_widget_scale_get(sobj);
+ double scale, pscale = efl_ui_scale_get(sobj);
Elm_Theme *th, *pth = elm_widget_theme_get(sobj);
- scale = elm_widget_scale_get(sobj);
+ scale = efl_ui_scale_get(sobj);
th = elm_widget_theme_get(sobj);
mirrored = elm_widget_mirrored_get(sobj);
return sd->scroll_freeze;
}
-EOLIAN static void
-_elm_widget_scale_set(Eo *obj, Elm_Widget_Smart_Data *sd, double scale)
+EOLIAN static Eina_Bool
+_elm_widget_efl_ui_base_scale_set(Eo *obj, Elm_Widget_Smart_Data *sd, double scale)
{
if (scale < 0.0) scale = 0.0;
if (sd->scale != scale)
sd->scale = scale;
elm_widget_theme(obj);
}
+ return EINA_TRUE;
}
EOLIAN static double
-_elm_widget_scale_get(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd)
+_elm_widget_efl_ui_base_scale_get(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd)
{
// FIXME: save walking up the tree by storing/caching parent scale
if (sd->scale == 0.0)
{
if (sd->parent_obj && elm_widget_is(sd->parent_obj))
{
- return elm_widget_scale_get(sd->parent_obj);
+ return efl_ui_scale_get(sd->parent_obj);
}
else
{
struct Elm.Cursor; [[Elementary cursor]]
struct @extern Elm.Theme; [[Elementary theme]]
-abstract Elm.Widget (Efl.Canvas.Group, Elm.Interface.Atspi_Accessible, Elm.Interface.Atspi_Component, Efl.Ui.Focus.User, Efl.Ui.Focus.Object)
+abstract Elm.Widget (Efl.Canvas.Group, Elm.Interface.Atspi_Accessible,
+ Elm.Interface.Atspi_Component, Efl.Ui.Focus.User,
+ Efl.Ui.Focus.Object, Efl.Ui.Base)
{
[[Elementary widget abstract class]]
legacy_prefix: elm_widget;
style: string; [[Style name]]
}
}
- @property scale {
- [[Scale factor]]
- values {
- scale: double; [[Scale factor]]
- }
- }
@property focus_custom_chain {
[[A custom chain of objects to pass focus.
Efl.Ui.Focus.User.parent { get; }
Efl.Ui.Focus.Object.focus_geometry { get; }
Efl.Ui.Focus.Object.focus { set; }
+ Efl.Ui.Base.scale { get; set; }
}
events {
moved; [[Called when widget moved]]
EAPI void elm_widget_scroll_freeze_push(Evas_Object *obj);
EAPI void elm_widget_scroll_freeze_pop(Evas_Object *obj);
EAPI int elm_widget_scroll_freeze_get(const Evas_Object *obj);
-EAPI void elm_widget_scale_set(Evas_Object *obj, double scale);
-EAPI double elm_widget_scale_get(const Evas_Object *obj);
EAPI Eina_Bool elm_widget_mirrored_get(const Evas_Object *obj);
EAPI void elm_widget_mirrored_set(Evas_Object *obj, Eina_Bool mirrored);
EAPI Eina_Bool elm_widget_mirrored_automatic_get(const Evas_Object *obj);