aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/edje/edje_util.c
diff options
context:
space:
mode:
authorDaniel Hirt <hirt.danny@gmail.com>2017-10-15 17:57:38 +0300
committerCedric BAIL <cedric@osg.samsung.com>2017-11-10 10:30:09 -0800
commitef3d2120bfa58f9247a441602bd30f13cc7f225a (patch)
treed6acaabe13a3b267eb3468845e5de19bbceb0cec /src/lib/edje/edje_util.c
parentEdje: move textblock handling to a separate source (diff)
downloadefl-ef3d2120bfa58f9247a441602bd30f13cc7f225a.tar.gz
Edje: use textblock by default
As most of you know, TEXT part was, up to this point, an Evas.Text object. This patch merges TEXT and TEXTBLOCK both to use Efl.Canvas.Text. Code is added to emulate what TEXT did that TEXTBLOCK did not. I believe we can move forward with TEXT, and deperacate TEXTBLOCK from the EDC. You can also set markup to TEXT parts. Exactness seems to show some differences, but further examination shows that it's due to difference in how width is calculated in Efl.Canvas.Text. The results seem correct. Be sure to report of any breakage via Phabricator or contact me directly. I am running E with this and did not stumble upon any crashes or visual bugs. Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Diffstat (limited to '')
-rw-r--r--src/lib/edje/edje_util.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/lib/edje/edje_util.c b/src/lib/edje/edje_util.c
index da5c3cb069..deea92545b 100644
--- a/src/lib/edje/edje_util.c
+++ b/src/lib/edje/edje_util.c
@@ -2078,7 +2078,7 @@ _edje_efl_text_get(Eo *obj EINA_UNUSED, Edje *ed, const char *part,
return desc->text.text.str;
}
}
- if (rp->part->type == EDJE_PART_TYPE_TEXTBLOCK)
+ else
{
const char *entry;
if (legacy)
@@ -3496,7 +3496,7 @@ again:
//width
if (!ep->chosen_description->fixed.w)
{
- if ((legacy_calc) && (ep->part->type == EDJE_PART_TYPE_TEXTBLOCK))
+ if ((legacy_calc) && PART_IS_TEXT(ed, ep))
{
//We care textblock width size specially.
Evas_Coord tb_mw;
@@ -3524,9 +3524,8 @@ again:
{
if (legacy_calc)
{
- if ((ep->part->type != EDJE_PART_TYPE_TEXTBLOCK) ||
- ((Edje_Part_Description_Text *)ep->chosen_description)->text.min_x ||
- !skip_h)
+ if (!PART_IS_TEXT(ed, ep) ||
+ ((Edje_Part_Description_Text *)ep->chosen_description)->text.min_x || !skip_h)
{
if (over_h > max_over_h)
{
@@ -3536,7 +3535,7 @@ again:
}
}
- if (ep->part->type == EDJE_PART_TYPE_TEXTBLOCK)
+ if (PART_IS_TEXT(ed, ep))
has_fixed_tb = EINA_FALSE;
}
else if (over_h > max_over_h)