forked from enlightenment/efl
parent
5856cddd6f
commit
24cb66cd71
|
@ -7,7 +7,7 @@ Release: 1
|
||||||
License: BSD
|
License: BSD
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
URL: http://www.enlightenment.org/
|
URL: http://www.enlightenment.org/
|
||||||
Source: %{name}-%{version}_pre13.tar.gz
|
Source: %{name}-%{version}.tar.gz
|
||||||
Packager: %{?_packager:%{_packager}}%{!?_packager:Michael Jennings <mej@eterm.org>}
|
Packager: %{?_packager:%{_packager}}%{!?_packager:Michael Jennings <mej@eterm.org>}
|
||||||
Vendor: %{?_vendorinfo:%{_vendorinfo}}%{!?_vendorinfo:The Enlightenment Project (http://www.enlightenment.org/)}
|
Vendor: %{?_vendorinfo:%{_vendorinfo}}%{!?_vendorinfo:The Enlightenment Project (http://www.enlightenment.org/)}
|
||||||
Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}}
|
Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}}
|
||||||
|
|
|
@ -974,7 +974,8 @@ evas_object_textblock_layout_internal(Evas_Object *obj, int w, int h, int *forma
|
||||||
int pad_l = 0, pad_r = 0, pad_t = 0, pad_b = 0;
|
int pad_l = 0, pad_r = 0, pad_t = 0, pad_b = 0;
|
||||||
int marginl = 0, marginr = 0;
|
int marginl = 0, marginr = 0;
|
||||||
int ww, hh;
|
int ww, hh;
|
||||||
|
int just_wrapped = 0;
|
||||||
|
|
||||||
o = (Evas_Object_Textblock *)(obj->object_data);
|
o = (Evas_Object_Textblock *)(obj->object_data);
|
||||||
ww = w;
|
ww = w;
|
||||||
hh = h;
|
hh = h;
|
||||||
|
@ -1266,6 +1267,16 @@ evas_object_textblock_layout_internal(Evas_Object *obj, int w, int h, int *forma
|
||||||
|
|
||||||
text = strdup(node->text);
|
text = strdup(node->text);
|
||||||
new_node:
|
new_node:
|
||||||
|
if (just_wrapped)
|
||||||
|
{
|
||||||
|
int pos, chr;
|
||||||
|
|
||||||
|
pos = 0;
|
||||||
|
chr = evas_common_font_utf8_get_next(text, &pos);
|
||||||
|
if (evas_object_textblock_char_is_white(chr))
|
||||||
|
strcpy(text, text + pos);
|
||||||
|
}
|
||||||
|
just_wrapped = 0;
|
||||||
/* FIXME: we cant do this - we need to be able to qury text
|
/* FIXME: we cant do this - we need to be able to qury text
|
||||||
* overflow amounts */
|
* overflow amounts */
|
||||||
/*
|
/*
|
||||||
|
@ -1408,23 +1419,33 @@ evas_object_textblock_layout_internal(Evas_Object *obj, int w, int h, int *forma
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
chr = evas_common_font_utf8_get_next(text, &ppos);
|
if (ppos == 0)
|
||||||
if (ppos < 0) ppos = 0;
|
|
||||||
chrpos = ppos;
|
|
||||||
while ((evas_object_textblock_char_is_white(chr))
|
|
||||||
&&
|
|
||||||
(pos >= 0) &&
|
|
||||||
(chr > 0))
|
|
||||||
{
|
{
|
||||||
ppos = pos;
|
nchrpos = 0;
|
||||||
chr = evas_common_font_utf8_get_prev(text, &pos);
|
chrpos--;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
chr = evas_common_font_utf8_get_next(text, &ppos);
|
||||||
|
if (ppos < 0) ppos = 0;
|
||||||
|
chrpos = ppos;
|
||||||
|
while
|
||||||
|
((evas_object_textblock_char_is_white(chr))
|
||||||
|
&&
|
||||||
|
(pos >= 0) &&
|
||||||
|
(chr > 0))
|
||||||
|
{
|
||||||
|
ppos = pos;
|
||||||
|
chr = evas_common_font_utf8_get_prev(text, &pos);
|
||||||
|
}
|
||||||
|
chr = evas_common_font_utf8_get_next(text, &ppos);
|
||||||
|
if (ppos < 0) ppos = 0;
|
||||||
|
nchrpos = ppos;
|
||||||
}
|
}
|
||||||
chr = evas_common_font_utf8_get_next(text, &ppos);
|
|
||||||
if (ppos < 0) ppos = 0;
|
|
||||||
nchrpos = ppos;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
just_wrapped = 1;
|
||||||
/* if the first char in the line can't fit!!! */
|
/* if the first char in the line can't fit!!! */
|
||||||
if ((chrpos == 0) && (lnode == line_start))
|
if ((chrpos == 0) && (lnode == line_start))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue