elementary / cursor, scroller, icon - removed white spaces
SVN revision: 58248
This commit is contained in:
parent
e88243c16a
commit
71d2f4b067
|
@ -18,7 +18,7 @@
|
|||
|
||||
#define _cursor_key "_elm_cursor"
|
||||
|
||||
struct _Cursor_Id
|
||||
struct _Cursor_Id
|
||||
{
|
||||
const char *name;
|
||||
#ifdef HAVE_ELEMENTARY_X
|
||||
|
|
|
@ -297,7 +297,7 @@ _els_smart_icon_orient_set(Evas_Object *obj, Elm_Image_Orient orient)
|
|||
return;
|
||||
case ELM_IMAGE_FLIP_VERTICAL:
|
||||
_els_smart_icon_flip_vertical(sd);
|
||||
return;
|
||||
return;
|
||||
case ELM_IMAGE_ROTATE_180_CW:
|
||||
_els_smart_icon_rotate_180(sd);
|
||||
return;
|
||||
|
@ -321,28 +321,28 @@ _els_smart_icon_orient_set(Evas_Object *obj, Elm_Image_Orient orient)
|
|||
switch (orient)
|
||||
{
|
||||
case ELM_IMAGE_FLIP_TRANSPOSE:
|
||||
to = data;
|
||||
hw = -hw + 1;
|
||||
break;
|
||||
to = data;
|
||||
hw = -hw + 1;
|
||||
break;
|
||||
case ELM_IMAGE_FLIP_TRANSVERSE:
|
||||
to = data + hw - 1;
|
||||
w = -w;
|
||||
hw = hw - 1;
|
||||
break;
|
||||
to = data + hw - 1;
|
||||
w = -w;
|
||||
hw = hw - 1;
|
||||
break;
|
||||
case ELM_IMAGE_ROTATE_90_CW:
|
||||
to = data + w - 1;
|
||||
hw = -hw - 1;
|
||||
break;
|
||||
to = data + w - 1;
|
||||
hw = -hw - 1;
|
||||
break;
|
||||
case ELM_IMAGE_ROTATE_90_CCW:
|
||||
to = data + hw - w;
|
||||
w = -w;
|
||||
hw = hw + 1;
|
||||
break;
|
||||
to = data + hw - w;
|
||||
w = -w;
|
||||
hw = hw + 1;
|
||||
break;
|
||||
default:
|
||||
ERR("unknown orient %d", orient);
|
||||
evas_object_del(tmp);
|
||||
evas_object_image_data_set(sd->obj, data); // give it back
|
||||
return;
|
||||
ERR("unknown orient %d", orient);
|
||||
evas_object_del(tmp);
|
||||
evas_object_image_data_set(sd->obj, data); // give it back
|
||||
return;
|
||||
}
|
||||
from = data2;
|
||||
for (x = iw; --x >= 0;)
|
||||
|
@ -423,66 +423,66 @@ _smart_reconfigure(Smart_Data *sd)
|
|||
if (!sd->obj) return;
|
||||
if (!strcmp(evas_object_type_get(sd->obj), "edje"))
|
||||
{
|
||||
w = sd->w;
|
||||
h = sd->h;
|
||||
x = sd->x;
|
||||
y = sd->y;
|
||||
evas_object_move(sd->obj, x, y);
|
||||
evas_object_resize(sd->obj, w, h);
|
||||
w = sd->w;
|
||||
h = sd->h;
|
||||
x = sd->x;
|
||||
y = sd->y;
|
||||
evas_object_move(sd->obj, x, y);
|
||||
evas_object_resize(sd->obj, w, h);
|
||||
}
|
||||
else
|
||||
{
|
||||
int iw = 0, ih = 0;
|
||||
|
||||
evas_object_image_size_get(sd->obj, &iw, &ih);
|
||||
evas_object_image_size_get(sd->obj, &iw, &ih);
|
||||
|
||||
iw = ((double)iw) * sd->scale;
|
||||
ih = ((double)ih) * sd->scale;
|
||||
iw = ((double)iw) * sd->scale;
|
||||
ih = ((double)ih) * sd->scale;
|
||||
|
||||
if (iw < 1) iw = 1;
|
||||
if (ih < 1) ih = 1;
|
||||
if (iw < 1) iw = 1;
|
||||
if (ih < 1) ih = 1;
|
||||
|
||||
if (sd->fill_inside)
|
||||
{
|
||||
w = sd->w;
|
||||
h = ((double)ih * w) / (double)iw;
|
||||
if (h > sd->h)
|
||||
{
|
||||
h = sd->h;
|
||||
w = ((double)iw * h) / (double)ih;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
w = sd->w;
|
||||
h = ((double)ih * w) / (double)iw;
|
||||
if (h < sd->h)
|
||||
{
|
||||
h = sd->h;
|
||||
w = ((double)iw * h) / (double)ih;
|
||||
}
|
||||
}
|
||||
if (!sd->scale_up)
|
||||
{
|
||||
if ((w > iw) || (h > ih))
|
||||
{
|
||||
w = iw;
|
||||
h = ih;
|
||||
}
|
||||
}
|
||||
if (!sd->scale_down)
|
||||
{
|
||||
if ((w < iw) || (h < ih))
|
||||
{
|
||||
w = iw;
|
||||
h = ih;
|
||||
}
|
||||
}
|
||||
x = sd->x + ((sd->w - w) / 2);
|
||||
y = sd->y + ((sd->h - h) / 2);
|
||||
evas_object_move(sd->obj, x, y);
|
||||
evas_object_image_fill_set(sd->obj, 0, 0, w, h);
|
||||
evas_object_resize(sd->obj, w, h);
|
||||
if (sd->fill_inside)
|
||||
{
|
||||
w = sd->w;
|
||||
h = ((double)ih * w) / (double)iw;
|
||||
if (h > sd->h)
|
||||
{
|
||||
h = sd->h;
|
||||
w = ((double)iw * h) / (double)ih;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
w = sd->w;
|
||||
h = ((double)ih * w) / (double)iw;
|
||||
if (h < sd->h)
|
||||
{
|
||||
h = sd->h;
|
||||
w = ((double)iw * h) / (double)ih;
|
||||
}
|
||||
}
|
||||
if (!sd->scale_up)
|
||||
{
|
||||
if ((w > iw) || (h > ih))
|
||||
{
|
||||
w = iw;
|
||||
h = ih;
|
||||
}
|
||||
}
|
||||
if (!sd->scale_down)
|
||||
{
|
||||
if ((w < iw) || (h < ih))
|
||||
{
|
||||
w = iw;
|
||||
h = ih;
|
||||
}
|
||||
}
|
||||
x = sd->x + ((sd->w - w) / 2);
|
||||
y = sd->y + ((sd->h - h) / 2);
|
||||
evas_object_move(sd->obj, x, y);
|
||||
evas_object_image_fill_set(sd->obj, 0, 0, w, h);
|
||||
evas_object_resize(sd->obj, w, h);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -491,28 +491,28 @@ _smart_init(void)
|
|||
{
|
||||
if (_e_smart) return;
|
||||
{
|
||||
static const Evas_Smart_Class sc =
|
||||
{
|
||||
"e_icon",
|
||||
EVAS_SMART_CLASS_VERSION,
|
||||
_smart_add,
|
||||
_smart_del,
|
||||
_smart_move,
|
||||
_smart_resize,
|
||||
_smart_show,
|
||||
_smart_hide,
|
||||
_smart_color_set,
|
||||
_smart_clip_set,
|
||||
_smart_clip_unset,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
_e_smart = evas_smart_class_new(&sc);
|
||||
static const Evas_Smart_Class sc =
|
||||
{
|
||||
"e_icon",
|
||||
EVAS_SMART_CLASS_VERSION,
|
||||
_smart_add,
|
||||
_smart_del,
|
||||
_smart_move,
|
||||
_smart_resize,
|
||||
_smart_show,
|
||||
_smart_hide,
|
||||
_smart_color_set,
|
||||
_smart_clip_set,
|
||||
_smart_clip_unset,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
_e_smart = evas_smart_class_new(&sc);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue