forked from enlightenment/efl
evas - minor visual fixup with impossible border scaling to be more sensible
This commit is contained in:
parent
7506faaca2
commit
9b8f67ec4d
|
@ -3967,25 +3967,25 @@ evas_object_image_render(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, v
|
||||||
br = o->cur->border.r;
|
br = o->cur->border.r;
|
||||||
bt = o->cur->border.t;
|
bt = o->cur->border.t;
|
||||||
bb = o->cur->border.b;
|
bb = o->cur->border.b;
|
||||||
if ((bl + br) > iw)
|
if ((bl + br) > imagew)
|
||||||
{
|
{
|
||||||
bl = iw / 2;
|
bl = imagew / 2;
|
||||||
br = iw - bl;
|
br = imagew - bl;
|
||||||
}
|
}
|
||||||
if ((bl + br) > imw)
|
if ((bl + br) > imagew)
|
||||||
{
|
{
|
||||||
bl = imw / 2;
|
bl = imagew / 2;
|
||||||
br = imw - bl;
|
br = imagew - bl;
|
||||||
}
|
}
|
||||||
if ((bt + bb) > ih)
|
if ((bt + bb) > imageh)
|
||||||
{
|
{
|
||||||
bt = ih / 2;
|
bt = imageh / 2;
|
||||||
bb = ih - bt;
|
bb = imageh - bt;
|
||||||
}
|
}
|
||||||
if ((bt + bb) > imh)
|
if ((bt + bb) > imageh)
|
||||||
{
|
{
|
||||||
bt = imh / 2;
|
bt = imageh / 2;
|
||||||
bb = imh - bt;
|
bb = imageh - bt;
|
||||||
}
|
}
|
||||||
if (o->cur->border.scale != 1.0)
|
if (o->cur->border.scale != 1.0)
|
||||||
{
|
{
|
||||||
|
@ -4053,6 +4053,11 @@ evas_object_image_render(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, v
|
||||||
inw = br; inh = imh - bt - bb;
|
inw = br; inh = imh - bt - bb;
|
||||||
outx = ox + iw - bsr; outy = oy + bst;
|
outx = ox + iw - bsr; outy = oy + bst;
|
||||||
outw = bsr; outh = ih - bst - bsb;
|
outw = bsr; outh = ih - bst - bsb;
|
||||||
|
if (br == 80)
|
||||||
|
{
|
||||||
|
printf("%i %i %ix%i -> %i %i %ix%i\n",
|
||||||
|
inx, iny, inw, inh, outx, outy, outw, outh);
|
||||||
|
}
|
||||||
_draw_image(obj, output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur->smooth_scale, do_async);
|
_draw_image(obj, output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur->smooth_scale, do_async);
|
||||||
// |
|
// |
|
||||||
// #--
|
// #--
|
||||||
|
|
Loading…
Reference in New Issue