efl_ui/image: scalable -> efl.gfx.image::can_up/downscale

this removes the property from the image class to use the properties
from the interface

ref T7873

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9704
This commit is contained in:
Mike Blumenkrantz 2019-08-22 08:35:44 -04:00 committed by Marcel Hollerbach
parent d50fdce4d3
commit e84ecd9552
2 changed files with 24 additions and 22 deletions

View File

@ -1595,21 +1595,35 @@ _efl_ui_image_efl_gfx_image_scale_type_get(const Eo *obj EINA_UNUSED, Efl_Ui_Ima
}
EOLIAN static void
_efl_ui_image_scalable_set(Eo *obj, Efl_Ui_Image_Data *sd, Eina_Bool up, Eina_Bool down)
_efl_ui_image_efl_gfx_image_can_upscale_set(Eo *obj, Efl_Ui_Image_Data *sd, Eina_Bool can_upscale)
{
if ((up == sd->scale_up) && (down == sd->scale_down)) return;
if (can_upscale == sd->scale_up) return;
sd->scale_up = !!up;
sd->scale_down = !!down;
sd->scale_up = !!can_upscale;
efl_canvas_group_change(obj);
}
EOLIAN static void
_efl_ui_image_scalable_get(const Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *sd, Eina_Bool *scale_up, Eina_Bool *scale_down)
EOLIAN static Eina_Bool
_efl_ui_image_efl_gfx_image_can_upscale_get(const Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *sd)
{
if (scale_up) *scale_up = sd->scale_up;
if (scale_down) *scale_down = sd->scale_down;
return sd->scale_up;
}
EOLIAN static void
_efl_ui_image_efl_gfx_image_can_downscale_set(Eo *obj, Efl_Ui_Image_Data *sd, Eina_Bool can_downscale)
{
if (can_downscale == sd->scale_down) return;
sd->scale_down = !!can_downscale;
efl_canvas_group_change(obj);
}
EOLIAN static Eina_Bool
_efl_ui_image_efl_gfx_image_can_downscale_get(const Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *sd)
{
return sd->scale_down;
}
EOLIAN static void

View File

@ -30,20 +30,6 @@ class @beta Efl.Ui.Image extends Efl.Ui.Widget implements Efl.Input.Clickable, E
]]
event_prefix: efl_ui_image;
methods {
@property scalable {
[[Enable or disable scaling up or down the internal image.
]]
values {
scale_up: bool; [[If $true, the internal image might be scaled up
if necessary according to the scale type.
if $false, the internal image is not scaled up
no matter what the scale type is.]]
scale_down: bool; [[If $true, the internal image might be scaled down
if necessary according to the scale type.
if $false, the internal image is not scaled down
no matter what the scale type is.]]
}
}
@property icon {
set {
[[Set the image by icon standards names.
@ -89,6 +75,8 @@ class @beta Efl.Ui.Image extends Efl.Ui.Widget implements Efl.Input.Clickable, E
Efl.Gfx.Entity.position { set; }
Efl.Gfx.Entity.size { set; }
Efl.Gfx.View.view_size { get; }
Efl.Gfx.Image.can_upscale { get; set; }
Efl.Gfx.Image.can_downscale { get; set; }
Efl.Gfx.Image.image_size { get; }
Efl.Gfx.Image_Load_Controller.load_size { get; set; }
Efl.Gfx.Image.smooth_scale { get; set; }