diff --git a/src/lib/elementary/efl_ui_image.c b/src/lib/elementary/efl_ui_image.c index c1992c585d..b4e4a0a695 100644 --- a/src/lib/elementary/efl_ui_image.c +++ b/src/lib/elementary/efl_ui_image.c @@ -751,7 +751,7 @@ _efl_ui_image_sizing_eval(Evas_Object *obj) 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; diff --git a/src/lib/elementary/efl_ui_progressbar.c b/src/lib/elementary/efl_ui_progressbar.c index e8ef50fdbf..02117775a8 100644 --- a/src/lib/elementary/efl_ui_progressbar.c +++ b/src/lib/elementary/efl_ui_progressbar.c @@ -216,11 +216,11 @@ _efl_ui_progressbar_elm_widget_theme_apply(Eo *obj, Efl_Ui_Progressbar_Data *sd) 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)) @@ -406,11 +406,11 @@ _efl_ui_progressbar_efl_ui_progress_span_size_set(Eo *obj, Efl_Ui_Progressbar_Da 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); diff --git a/src/lib/elementary/efl_ui_text.c b/src/lib/elementary/efl_ui_text.c index 45bb385bdf..c62b20e086 100644 --- a/src/lib/elementary/efl_ui_text.c +++ b/src/lib/elementary/efl_ui_text.c @@ -925,7 +925,7 @@ _efl_ui_text_elm_widget_theme_apply(Eo *obj, Efl_Ui_Text_Data *sd) 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)); diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c index 62005bbc8d..93042dd8e0 100644 --- a/src/lib/elementary/efl_ui_win.c +++ b/src/lib/elementary/efl_ui_win.c @@ -6209,7 +6209,7 @@ _elm_win_theme_internal(Eo *obj, Efl_Ui_Win_Data *sd) 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); diff --git a/src/lib/elementary/elc_multibuttonentry.c b/src/lib/elementary/elc_multibuttonentry.c index d369c8d721..daf1130c1a 100644 --- a/src/lib/elementary/elc_multibuttonentry.c +++ b/src/lib/elementary/elc_multibuttonentry.c @@ -103,7 +103,7 @@ _elm_multibuttonentry_elm_widget_theme_apply(Eo *obj, Elm_Multibuttonentry_Data 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)); @@ -1458,7 +1458,7 @@ _view_init(Evas_Object *obj, Elm_Multibuttonentry_Data *sd) 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)); diff --git a/src/lib/elementary/elm_clock.c b/src/lib/elementary/elm_clock.c index 0ca59dd2ab..b0b62dcf8d 100644 --- a/src/lib/elementary/elm_clock.c +++ b/src/lib/elementary/elm_clock.c @@ -379,7 +379,7 @@ _time_update(Evas_Object *obj, Eina_Bool theme_update) } 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++) @@ -392,7 +392,7 @@ _time_update(Evas_Object *obj, Eina_Bool theme_update) 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))) @@ -426,7 +426,7 @@ _time_update(Evas_Object *obj, Eina_Bool theme_update) 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 diff --git a/src/lib/elementary/elm_colorselector.c b/src/lib/elementary/elm_colorselector.c index d3750552b6..10a3c523a1 100644 --- a/src/lib/elementary/elm_colorselector.c +++ b/src/lib/elementary/elm_colorselector.c @@ -1322,7 +1322,7 @@ _elm_colorselector_elm_widget_theme_apply(Eo *obj, Elm_Colorselector_Data *sd) (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) @@ -1878,7 +1878,7 @@ _create_colorpalette(Evas_Object *obj) 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)) diff --git a/src/lib/elementary/elm_entry.c b/src/lib/elementary/elm_entry.c index 9368bc8305..6beff4ea2a 100644 --- a/src/lib/elementary/elm_entry.c +++ b/src/lib/elementary/elm_entry.c @@ -860,7 +860,7 @@ _elm_entry_elm_widget_theme_apply(Eo *obj, Elm_Entry_Data *sd) 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)); diff --git a/src/lib/elementary/elm_gengrid.c b/src/lib/elementary/elm_gengrid.c index 62a1ab72dd..309e955f46 100644 --- a/src/lib/elementary/elm_gengrid.c +++ b/src/lib/elementary/elm_gengrid.c @@ -215,7 +215,7 @@ _item_cache_add(Elm_Gen_Item *it) 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); @@ -1122,7 +1122,7 @@ _view_style_update(Elm_Gen_Item *it, Evas_Object *view, const char *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()); evas_object_stack_below(view, sd->stack); } @@ -1136,7 +1136,7 @@ _view_create(Elm_Gen_Item *it, const char *style) 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); diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c index 35f6bc8f64..63e96e52aa 100644 --- a/src/lib/elementary/elm_genlist.c +++ b/src/lib/elementary/elm_genlist.c @@ -547,7 +547,7 @@ _view_style_update(Elm_Gen_Item *it, Evas_Object *view, const char *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"); @@ -568,7 +568,7 @@ _view_create(Elm_Gen_Item *it, const char *style) 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); @@ -1384,7 +1384,7 @@ _decorate_all_item_realize(Elm_Gen_Item *it, 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); @@ -1621,7 +1621,7 @@ _item_cache_add(Elm_Gen_Item *it, Eina_List *contents) 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; diff --git a/src/lib/elementary/elm_image_legacy.h b/src/lib/elementary/elm_image_legacy.h index 90650d4a74..a79f88ce27 100644 --- a/src/lib/elementary/elm_image_legacy.h +++ b/src/lib/elementary/elm_image_legacy.h @@ -486,7 +486,7 @@ EAPI void elm_image_resizable_get(const Evas_Object *obj, Eina_Bool *up, Eina_Bo * 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. @@ -501,7 +501,7 @@ EAPI void elm_image_no_scale_set(Evas_Object *obj, Eina_Bool no_scale); * 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. diff --git a/src/lib/elementary/elm_layout.c b/src/lib/elementary/elm_layout.c index 7d5c3fbfd2..8a8baa60c1 100644 --- a/src/lib/elementary/elm_layout.c +++ b/src/lib/elementary/elm_layout.c @@ -321,7 +321,7 @@ _visuals_refresh(Evas_Object *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()); _elm_layout_highlight_in_theme(obj); diff --git a/src/lib/elementary/elm_list.c b/src/lib/elementary/elm_list.c index adc319ff31..7fa0d975ef 100644 --- a/src/lib/elementary/elm_list.c +++ b/src/lib/elementary/elm_list.c @@ -1108,7 +1108,7 @@ _elm_list_elm_widget_theme_apply(Eo *obj, Elm_List_Data *sd) { 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; } diff --git a/src/lib/elementary/elm_main.c b/src/lib/elementary/elm_main.c index 0380a388ba..20d3380b80 100644 --- a/src/lib/elementary/elm_main.c +++ b/src/lib/elementary/elm_main.c @@ -1434,14 +1434,14 @@ elm_object_scale_set(Evas_Object *obj, 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 diff --git a/src/lib/elementary/elm_menu.c b/src/lib/elementary/elm_menu.c index e6d270240b..f430285911 100644 --- a/src/lib/elementary/elm_menu.c +++ b/src/lib/elementary/elm_menu.c @@ -293,7 +293,7 @@ _elm_menu_elm_widget_theme_apply(Eo *obj, Elm_Menu_Data *sd) 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()); */ } diff --git a/src/lib/elementary/elm_notify.c b/src/lib/elementary/elm_notify.c index 436bc3c765..3b7e4f219d 100644 --- a/src/lib/elementary/elm_notify.c +++ b/src/lib/elementary/elm_notify.c @@ -153,7 +153,7 @@ _elm_notify_elm_widget_theme_apply(Eo *obj, Elm_Notify_Data *sd) 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); diff --git a/src/lib/elementary/elm_photo.c b/src/lib/elementary/elm_photo.c index ddfc4c40ff..7b67b81159 100644 --- a/src/lib/elementary/elm_photo.c +++ b/src/lib/elementary/elm_photo.c @@ -37,7 +37,7 @@ _sizing_eval(Evas_Object *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); @@ -65,10 +65,10 @@ _elm_photo_elm_widget_theme_apply(Eo *obj, Elm_Photo_Data *sd) (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; @@ -260,7 +260,7 @@ _elm_photo_efl_canvas_group_group_add(Eo *obj, Elm_Photo_Data *priv) 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); diff --git a/src/lib/elementary/elm_segment_control.c b/src/lib/elementary/elm_segment_control.c index 212593cf3d..5bbdfad47e 100644 --- a/src/lib/elementary/elm_segment_control.c +++ b/src/lib/elementary/elm_segment_control.c @@ -234,7 +234,7 @@ _elm_segment_control_elm_widget_theme_apply(Eo *obj, Elm_Segment_Control_Data *s 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); } @@ -597,7 +597,7 @@ _elm_segment_control_item_efl_object_constructor(Eo *obj, Elm_Segment_Control_It 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); diff --git a/src/lib/elementary/elm_slider.c b/src/lib/elementary/elm_slider.c index a598a8a66b..62e80cb19f 100644 --- a/src/lib/elementary/elm_slider.c +++ b/src/lib/elementary/elm_slider.c @@ -710,7 +710,7 @@ _popup_add(Elm_Slider_Data *sd, Eo *obj, Evas_Object **popup, _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); @@ -783,10 +783,10 @@ _elm_slider_elm_widget_theme_apply(Eo *obj, Elm_Slider_Data *sd) 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); @@ -800,11 +800,11 @@ _elm_slider_elm_widget_theme_apply(Eo *obj, Elm_Slider_Data *sd) 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) @@ -1078,11 +1078,11 @@ _elm_slider_efl_canvas_group_group_calculate(Eo *obj, Elm_Slider_Data *sd) 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); diff --git a/src/lib/elementary/elm_toolbar.c b/src/lib/elementary/elm_toolbar.c index 26d4068628..ecb75a2167 100644 --- a/src/lib/elementary/elm_toolbar.c +++ b/src/lib/elementary/elm_toolbar.c @@ -1021,7 +1021,7 @@ _internal_elm_toolbar_icon_size_get(Evas_Object *obj) (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; @@ -1565,7 +1565,7 @@ _elm_toolbar_elm_widget_theme_apply(Eo *obj, Elm_Toolbar_Data *sd) 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); @@ -1693,7 +1693,7 @@ _elm_toolbar_item_elm_widget_item_part_content_set(Eo *eo_item EINA_UNUSED, Elm_ 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); } @@ -1727,7 +1727,7 @@ _elm_toolbar_item_elm_widget_item_part_content_unset(Eo *eo_item EINA_UNUSED, El _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; @@ -3132,7 +3132,7 @@ _elm_toolbar_item_append(Eo *obj, Elm_Toolbar_Data *sd, const char *icon, const 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); @@ -3158,7 +3158,7 @@ _elm_toolbar_item_prepend(Eo *obj, Elm_Toolbar_Data *sd, const char *icon, const 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); @@ -3187,7 +3187,7 @@ _elm_toolbar_item_insert_before(Eo *obj, Elm_Toolbar_Data *sd, Elm_Object_Item * 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); @@ -3216,7 +3216,7 @@ _elm_toolbar_item_insert_after(Eo *obj, Elm_Toolbar_Data *sd, Elm_Object_Item *e 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); @@ -3462,7 +3462,7 @@ _elm_toolbar_item_separator_set(Eo *eo_item EINA_UNUSED, Elm_Toolbar_Item_Data * 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++; diff --git a/src/lib/elementary/elm_widget.c b/src/lib/elementary/elm_widget.c index b8606c6f43..5c50d51371 100644 --- a/src/lib/elementary/elm_widget.c +++ b/src/lib/elementary/elm_widget.c @@ -1443,10 +1443,10 @@ _elm_widget_sub_object_add(Eo *obj, Elm_Widget_Smart_Data *sd, Evas_Object *sobj * 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); @@ -3664,8 +3664,8 @@ _elm_widget_scroll_freeze_get(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd) 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) @@ -3673,17 +3673,18 @@ _elm_widget_scale_set(Eo *obj, Elm_Widget_Smart_Data *sd, double 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 { diff --git a/src/lib/elementary/elm_widget.eo b/src/lib/elementary/elm_widget.eo index 4b9dcb828e..1dfc37666a 100644 --- a/src/lib/elementary/elm_widget.eo +++ b/src/lib/elementary/elm_widget.eo @@ -30,7 +30,9 @@ struct Elm.Tooltip; [[Elementary tooltip]] 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; @@ -120,12 +122,6 @@ abstract Elm.Widget (Efl.Canvas.Group, Elm.Interface.Atspi_Accessible, Elm.Inter 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. @@ -836,6 +832,7 @@ abstract Elm.Widget (Efl.Canvas.Group, Elm.Interface.Atspi_Accessible, Elm.Inter 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]] diff --git a/src/lib/elementary/elm_widget.h b/src/lib/elementary/elm_widget.h index fa391c637b..db7ae10dd7 100644 --- a/src/lib/elementary/elm_widget.h +++ b/src/lib/elementary/elm_widget.h @@ -729,8 +729,6 @@ EAPI int elm_widget_scroll_hold_get(const Evas_Object *obj); 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);