Edje text classes: Fixed issues with textblock and some inconsistency.
SVN revision: 73601
This commit is contained in:
parent
a367917778
commit
c62f3a2bb5
|
@ -518,4 +518,8 @@
|
||||||
|
|
||||||
* Textblock: Fixed issue with updating only the font size using text
|
* Textblock: Fixed issue with updating only the font size using text
|
||||||
classes.
|
classes.
|
||||||
|
* Textblock: Fixed updating textblock text_class with
|
||||||
|
edje_text_class_set.
|
||||||
|
* Text classes: Fixed edje_text_class_set to behave like
|
||||||
|
edje_object_text_class_set (and as expected) wrt NULL fonts.
|
||||||
|
|
||||||
|
|
|
@ -816,23 +816,20 @@ edje_text_class_set(const char *text_class, const char *font, Evas_Font_Size siz
|
||||||
|
|
||||||
tc->font = eina_stringshare_add(font);
|
tc->font = eina_stringshare_add(font);
|
||||||
tc->size = size;
|
tc->size = size;
|
||||||
return EINA_FALSE;
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
/* If the class found is the same just return */
|
|
||||||
if ((tc->size == size) && (tc->font) && (!strcmp(tc->font, font)))
|
|
||||||
return EINA_TRUE;
|
|
||||||
|
|
||||||
/* Update the class found */
|
|
||||||
eina_stringshare_del(tc->font);
|
|
||||||
tc->font = eina_stringshare_add(font);
|
|
||||||
if (!tc->font)
|
|
||||||
{
|
{
|
||||||
eina_hash_del(_edje_text_class_hash, text_class, tc);
|
/* Match and the same, return */
|
||||||
free(tc);
|
if ((tc->size == size) ||
|
||||||
return EINA_FALSE;
|
(tc->font == font) ||
|
||||||
|
(tc->font && font && !strcmp(tc->font, font)))
|
||||||
|
return EINA_TRUE;
|
||||||
|
|
||||||
|
/* Update the class found */
|
||||||
|
eina_stringshare_del(tc->font);
|
||||||
|
tc->font = eina_stringshare_add(font);
|
||||||
|
tc->size = size;
|
||||||
}
|
}
|
||||||
tc->size = size;
|
|
||||||
|
|
||||||
/* Tell all members of the text class to recalc */
|
/* Tell all members of the text class to recalc */
|
||||||
members = eina_hash_find(_edje_text_class_member_hash, text_class);
|
members = eina_hash_find(_edje_text_class_member_hash, text_class);
|
||||||
|
@ -923,12 +920,10 @@ edje_object_text_class_set(Evas_Object *obj, const char *text_class, const char
|
||||||
if ((tc->name) && (!strcmp(tc->name, text_class)))
|
if ((tc->name) && (!strcmp(tc->name, text_class)))
|
||||||
{
|
{
|
||||||
/* Match and the same, return */
|
/* Match and the same, return */
|
||||||
if ((tc->font) && (font) && (!strcmp(tc->font, font)) &&
|
if ((tc->size == size) ||
|
||||||
(tc->size == size))
|
(tc->font == font) ||
|
||||||
return EINA_TRUE;
|
(tc->font && font && !strcmp(tc->font, font)))
|
||||||
|
return EINA_TRUE;
|
||||||
/* No font but size is the same, return */
|
|
||||||
if ((!tc->font) && (!font) && (tc->size == size)) return EINA_TRUE;
|
|
||||||
|
|
||||||
/* Update new text class properties */
|
/* Update new text class properties */
|
||||||
if (tc->font) eina_stringshare_del(tc->font);
|
if (tc->font) eina_stringshare_del(tc->font);
|
||||||
|
|
Loading…
Reference in New Issue