Evas textblock: Fixed a bug with scaling items.
SVN revision: 61334
This commit is contained in:
parent
3755bdac92
commit
6c48f6f881
|
@ -2290,17 +2290,14 @@ _layout_calculate_format_item_size(const Evas_Object *obj,
|
||||||
switch (fi->size)
|
switch (fi->size)
|
||||||
{
|
{
|
||||||
case SIZE:
|
case SIZE:
|
||||||
if (!strncmp(s, "item", 4))
|
p = strstr(s, " size=");
|
||||||
|
if (p)
|
||||||
{
|
{
|
||||||
p = strstr(s, " size=");
|
p += 6;
|
||||||
if (p)
|
if (sscanf(p, "%ix%i", &w, &h) == 2)
|
||||||
{
|
{
|
||||||
p += 6;
|
w = w * obj->cur.scale;
|
||||||
if (sscanf(p, "%ix%i", &w, &h) == 2)
|
h = h * obj->cur.scale;
|
||||||
{
|
|
||||||
w = w * obj->cur.scale;
|
|
||||||
h = h * obj->cur.scale;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -2335,22 +2332,22 @@ _layout_calculate_format_item_size(const Evas_Object *obj,
|
||||||
switch (fi->vsize)
|
switch (fi->vsize)
|
||||||
{
|
{
|
||||||
case VSIZE_FULL:
|
case VSIZE_FULL:
|
||||||
if (fi->parent.h > (*maxdescent + *maxascent))
|
if (h > (*maxdescent + *maxascent))
|
||||||
{
|
{
|
||||||
*maxascent += fi->parent.h - (*maxdescent + *maxascent);
|
*maxascent += h - (*maxdescent + *maxascent);
|
||||||
*_y = -*maxascent;
|
*_y = -*maxascent;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
*_y = -(fi->parent.h - *maxdescent);
|
*_y = -(h - *maxdescent);
|
||||||
break;
|
break;
|
||||||
case VSIZE_ASCENT:
|
case VSIZE_ASCENT:
|
||||||
if (fi->parent.h > *maxascent)
|
if (h > *maxascent)
|
||||||
{
|
{
|
||||||
*maxascent = fi->parent.h;
|
*maxascent = h;
|
||||||
*_y = -fi->parent.h;
|
*_y = -h;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
*_y = -fi->parent.h;
|
*_y = -h;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue