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