edje/textblock - keep the styles if the new font by the text class is applied.

text is already did. for the consistency textblock should be kept the same way.
This commit is contained in:
ChunEon Park 2013-05-22 18:04:34 +09:00
parent f380fa75cf
commit e83accf1ee
5 changed files with 20 additions and 7 deletions

View File

@ -1,3 +1,7 @@
2013-05-22 ChunEon Park (Hermet)
* Edje textblock: keep the text styles when new font by the text class is applied.
2013-05-16 Tom Hacohen
* Edje textblock: Fixed issue with quoted formats.

1
NEWS
View File

@ -271,3 +271,4 @@ Fixes:
* Edje entry: return surrounding string until the start position of selection
* Ecore-imf: fix crash when ecore_imf_context_del is called in ecore_imf_context_input_panel_callback_call
* Edje textblock: Fixed issue with quoted formats.
* Edje textblock: Keep the text styles when new font by the text class is applied.

View File

@ -1972,13 +1972,16 @@ void _edje_text_init(void);
void _edje_text_part_on_add(Edje *ed, Edje_Real_Part *ep);
void _edje_text_part_on_del(Edje *ed, Edje_Part *ep);
void _edje_text_recalc_apply(Edje *ed,
Edje_Real_Part *ep,
Edje_Calc_Params *params,
Edje_Part_Description_Text *chosen_desc);
Edje_Real_Part *ep,
Edje_Calc_Params *params,
Edje_Part_Description_Text *chosen_desc);
Evas_Font_Size _edje_text_size_calc(Evas_Font_Size size, Edje_Text_Class *tc);
const char * _edje_text_class_font_get(Edje *ed,
Edje_Part_Description_Text *chosen_desc,
int *size, char **free_later);
Edje_Part_Description_Text *chosen_desc,
int *size, char **free_later);
const char * _edje_text_font_get(const char *base, const char *new,
char **free_later);
Edje_Real_Part *_edje_real_part_get(const Edje *ed, const char *part);

View File

@ -102,7 +102,7 @@ _edje_text_fit_x(Edje *ed, Edje_Real_Part *ep,
return text;
}
static const char *
const char *
_edje_text_font_get(const char *base, const char *new, char **free_later)
{
const char *base_style, *new_style, *aux;

View File

@ -238,12 +238,17 @@ _edje_textblock_style_all_update(Edje *ed)
if (tag->font)
{
const char *f;
char *sfont = NULL;
eina_strbuf_append(txt, " ");
eina_strbuf_append(txt, "font=");
f = (tc && tc->font) ? tc->font : tag->font;
if (tc) f = _edje_text_font_get(tag->font, tc->font, &sfont);
else f = tag->font;
eina_strbuf_append_escaped(txt, f);
if (sfont) free(sfont);
}
eina_strbuf_append(txt, "'");