forked from enlightenment/enlightenment
file preview text display - calculate minimum size so alignment is ok
this fixes T444 - the display of text is properly top-left aligned with scrollbars now actually correct too for the text provided (note that the preview doesnt put ALL text in there. just the first N bytes which by default is 2048 but can be changed).
This commit is contained in:
parent
423f65d114
commit
a10d87a326
|
@ -914,12 +914,15 @@ _e_wid_fprev_preview_txt_read_notify(void *data, Ecore_Thread *eth __UNUSED__, v
|
|||
{
|
||||
E_Widget_Data *wd = data;
|
||||
char *buf;
|
||||
Evas_Coord mw, mh;
|
||||
|
||||
//INF("text='%s'", (char*)msg);
|
||||
buf = alloca(strlen(msg) + 4096);
|
||||
strcpy(buf, "<align=left>");
|
||||
strcat(buf, msg);
|
||||
edje_object_part_text_set(wd->o_preview_preview, "e.textblock.message", buf);
|
||||
edje_object_size_min_calc(wd->o_preview_preview, &mw, &mh);
|
||||
evas_object_resize(wd->o_preview_preview, mw, mh);
|
||||
free(msg);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue