forked from enlightenment/efl
edje: fix program transition generation by Edje_Edit.
Summary: fix possible CURRENT option omission (0-time transition + non-LINEAR transition type. fix extra ';' for omitted 0-time LINEAR transition Reviewers: cedric, seoz, raster, Hermet Subscribers: cedric, reutskiy.v.v Differential Revision: https://phab.enlightenment.org/D2279 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
parent
0de1bde1ca
commit
9fdcecebe3
|
@ -10401,6 +10401,7 @@ _edje_generate_source_of_program(Evas_Object *obj, const char *program, Eina_Str
|
||||||
double db, db2,v1,v2,v3,v4;
|
double db, db2,v1,v2,v3,v4;
|
||||||
char *data;
|
char *data;
|
||||||
Eina_Bool ret = EINA_TRUE;
|
Eina_Bool ret = EINA_TRUE;
|
||||||
|
Eina_Bool no_transition = EINA_FALSE;
|
||||||
const char *api_name, *api_description;
|
const char *api_name, *api_description;
|
||||||
Edje_Program *epr;
|
Edje_Program *epr;
|
||||||
int tweenmode = 0;
|
int tweenmode = 0;
|
||||||
|
@ -10540,6 +10541,8 @@ _edje_generate_source_of_program(Evas_Object *obj, const char *program, Eina_Str
|
||||||
case EDJE_TWEEN_MODE_LINEAR:
|
case EDJE_TWEEN_MODE_LINEAR:
|
||||||
if (db)
|
if (db)
|
||||||
BUF_APPENDF(I4"transition: LINEAR %.5f", db);
|
BUF_APPENDF(I4"transition: LINEAR %.5f", db);
|
||||||
|
else
|
||||||
|
no_transition = EINA_TRUE;
|
||||||
break;
|
break;
|
||||||
case EDJE_TWEEN_MODE_ACCELERATE:
|
case EDJE_TWEEN_MODE_ACCELERATE:
|
||||||
BUF_APPENDF(I4"transition: ACCELERATE %.5f", db);
|
BUF_APPENDF(I4"transition: ACCELERATE %.5f", db);
|
||||||
|
@ -10585,15 +10588,17 @@ _edje_generate_source_of_program(Evas_Object *obj, const char *program, Eina_Str
|
||||||
BUF_APPENDF(I4"transition: CUBIC_BEZIER %.5f %.5f %.5f %.5f %.5f", db,v1,v2,v3,v4);
|
BUF_APPENDF(I4"transition: CUBIC_BEZIER %.5f %.5f %.5f %.5f %.5f", db,v1,v2,v3,v4);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
no_transition = EINA_TRUE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( db && (tweenmode >= EDJE_TWEEN_MODE_LINEAR) && (tweenmode < EDJE_TWEEN_MODE_LAST))
|
if (!no_transition)
|
||||||
{
|
{
|
||||||
if(epr->tween.mode & EDJE_TWEEN_MODE_OPT_FROM_CURRENT)
|
if (epr->tween.mode & EDJE_TWEEN_MODE_OPT_FROM_CURRENT)
|
||||||
BUF_APPENDF(" CURRENT");
|
BUF_APPENDF(" CURRENT;\n");
|
||||||
|
else
|
||||||
|
BUF_APPENDF(";\n");
|
||||||
}
|
}
|
||||||
BUF_APPENDF(";\n");
|
|
||||||
/* In */
|
/* In */
|
||||||
db = epr->in.from;
|
db = epr->in.from;
|
||||||
db2 = epr->in.range;
|
db2 = epr->in.range;
|
||||||
|
|
Loading…
Reference in New Issue