forked from enlightenment/efl
Canvas text: fix non-dirty paragraph width calculation
Follow-up fix for 1624417d91
.
Changed for a max comparison, rather than just assigning the line's
width.
Also, added a test case.
Fixes T5939
@fix
This commit is contained in:
parent
4337e77669
commit
048dcc3263
|
@ -3920,7 +3920,8 @@ loop_advance:
|
||||||
{
|
{
|
||||||
Evas_Coord new_wmax = c->ln->w +
|
Evas_Coord new_wmax = c->ln->w +
|
||||||
c->marginl + c->marginr - (c->o->style_pad.l + c->o->style_pad.r);
|
c->marginl + c->marginr - (c->o->style_pad.l + c->o->style_pad.r);
|
||||||
c->par->last_fw = new_wmax;
|
if (new_wmax > c->par->last_fw)
|
||||||
|
c->par->last_fw = new_wmax;
|
||||||
if (new_wmax > c->wmax)
|
if (new_wmax > c->wmax)
|
||||||
c->wmax = new_wmax;
|
c->wmax = new_wmax;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3865,6 +3865,16 @@ START_TEST(evas_textblock_size)
|
||||||
evas_textblock_cursor_text_append(cur, "Y");
|
evas_textblock_cursor_text_append(cur, "Y");
|
||||||
evas_object_textblock_size_formatted_get(tb, &w, &h);
|
evas_object_textblock_size_formatted_get(tb, &w, &h);
|
||||||
ck_assert_int_eq(bw, w);
|
ck_assert_int_eq(bw, w);
|
||||||
|
|
||||||
|
evas_object_textblock_text_markup_set(tb,
|
||||||
|
"XXXXXXXXXXXX<br>"
|
||||||
|
"X<ps>"
|
||||||
|
"YYY<br>");
|
||||||
|
evas_object_textblock_size_formatted_get(tb, &bw, &bh);
|
||||||
|
evas_textblock_cursor_paragraph_last(cur);
|
||||||
|
evas_textblock_cursor_text_append(cur, "Y");
|
||||||
|
evas_object_textblock_size_formatted_get(tb, &w, &h);
|
||||||
|
ck_assert_int_eq(bw, w);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME: There is a lot more to be done. */
|
/* FIXME: There is a lot more to be done. */
|
||||||
|
|
Loading…
Reference in New Issue