forked from enlightenment/efl
move a couple variables into loops, reformat slightly to make obvious a redundant variable set
SVN revision: 50703
This commit is contained in:
parent
40a5ee431a
commit
f33f0139a6
|
@ -407,12 +407,9 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
||||||
part_get_geometry(ep, &tw, &th);
|
part_get_geometry(ep, &tw, &th);
|
||||||
if (tw > sw)
|
if (tw > sw)
|
||||||
{
|
{
|
||||||
int psize;
|
|
||||||
|
|
||||||
psize = size;
|
|
||||||
while ((tw > sw) && (size > 0) && (tw != 0))
|
while ((tw > sw) && (size > 0) && (tw != 0))
|
||||||
{
|
{
|
||||||
psize = size;
|
int psize = size;
|
||||||
size = (size * sw) / tw;
|
size = (size * sw) / tw;
|
||||||
if ((psize - size) <= 0) size = psize - 1;
|
if ((psize - size) <= 0) size = psize - 1;
|
||||||
if (inlined_font) evas_object_text_font_source_set(ep->object, ed->path);
|
if (inlined_font) evas_object_text_font_source_set(ep->object, ed->path);
|
||||||
|
@ -426,12 +423,9 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
||||||
}
|
}
|
||||||
else if (tw < sw)
|
else if (tw < sw)
|
||||||
{
|
{
|
||||||
int psize;
|
|
||||||
|
|
||||||
psize = size;
|
|
||||||
while ((tw < sw) && (size > 0) && (tw != 0))
|
while ((tw < sw) && (size > 0) && (tw != 0))
|
||||||
{
|
{
|
||||||
psize = size;
|
int psize = size;
|
||||||
size = (size * sw) / tw;
|
size = (size * sw) / tw;
|
||||||
/* fprintf(stderr, "size = %i (%i, %i)\n", size, sw, tw); */
|
/* fprintf(stderr, "size = %i (%i, %i)\n", size, sw, tw); */
|
||||||
if ((psize - size) >= 0) size = psize + 1;
|
if ((psize - size) >= 0) size = psize + 1;
|
||||||
|
@ -498,13 +492,8 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
||||||
{
|
{
|
||||||
int bottom, top;
|
int bottom, top;
|
||||||
|
|
||||||
if (th < sh)
|
if (th < sh) bottom = 10;
|
||||||
bottom = 10;
|
else if (th > sh) bottom = 1;
|
||||||
else if (th > sh)
|
|
||||||
{
|
|
||||||
bottom = 1;
|
|
||||||
top = 10;
|
|
||||||
}
|
|
||||||
else bottom = 0; /* XXX shut up GCC, th == sh is handled before! */
|
else bottom = 0; /* XXX shut up GCC, th == sh is handled before! */
|
||||||
|
|
||||||
top = size;
|
top = size;
|
||||||
|
|
Loading…
Reference in New Issue