summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-01-04 17:52:54 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-01-17 14:35:28 +0900
commit26221aac1f9e06979a73b3b73be1303d8caa2e58 (patch)
tree053cf7cf36de1fb9055e28f3aa39603176a46f3d /src
parentde47187dde8374a61ef4082048f6d87339b7ebf5 (diff)
evas: Remove unused 'inset' field from tb items
Diffstat (limited to 'src')
-rw-r--r--src/lib/evas/canvas/evas_object_textblock.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c
index f08bc98c04..441b57f638 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -436,7 +436,6 @@ struct _Evas_Object_Textblock_Text_Item
436{ 436{
437 Evas_Object_Textblock_Item parent; /**< Textblock item. */ 437 Evas_Object_Textblock_Item parent; /**< Textblock item. */
438 Evas_Text_Props text_props; /**< Props for this item. */ 438 Evas_Text_Props text_props; /**< Props for this item. */
439 Evas_Coord inset; /**< Inset of text item. */
440 Evas_Coord x_adjustment; /**< Used to indicate by how much we adjusted sizes */ 439 Evas_Coord x_adjustment; /**< Used to indicate by how much we adjusted sizes */
441 int gfx_filter_id; /**< Index for the filter context in parent.format->gfx_filter */ 440 int gfx_filter_id; /**< Index for the filter context in parent.format->gfx_filter */
442}; 441};
@@ -3978,24 +3977,19 @@ _layout_item_merge_and_free(Ctxt *c,
3978static void 3977static void
3979_text_item_update_sizes(Ctxt *c, Evas_Object_Textblock_Text_Item *ti) 3978_text_item_update_sizes(Ctxt *c, Evas_Object_Textblock_Text_Item *ti)
3980{ 3979{
3981 int tw, th, inset, advw; 3980 int tw = 0, th = 0, advw = 0;
3982 const Evas_Object_Textblock_Format *fmt = ti->parent.format; 3981 const Evas_Object_Textblock_Format *fmt = ti->parent.format;
3983 int shad_sz = 0, shad_dst = 0, out_sz = 0; 3982 int shad_sz = 0, shad_dst = 0, out_sz = 0;
3984 int dx = 0, minx = 0, maxx = 0, shx1, shx2; 3983 int dx = 0, minx = 0, maxx = 0, shx1, shx2;
3985
3986 tw = th = 0;
3987 Evas_Object_Protected_Data *obj = efl_data_scope_get(c->obj, EFL_CANVAS_OBJECT_CLASS); 3984 Evas_Object_Protected_Data *obj = efl_data_scope_get(c->obj, EFL_CANVAS_OBJECT_CLASS);
3985
3988 if (fmt->font.font) 3986 if (fmt->font.font)
3989 ENFN->font_string_size_get(ENDT, fmt->font.font, 3987 {
3990 &ti->text_props, &tw, &th); 3988 ENFN->font_string_size_get(ENDT, fmt->font.font,
3991 inset = 0; 3989 &ti->text_props, &tw, &th);
3992 if (fmt->font.font) 3990 advw = ENFN->font_h_advance_get(ENDT, fmt->font.font,
3993 inset = ENFN->font_inset_get(ENDT, fmt->font.font, 3991 &ti->text_props);
3994 &ti->text_props); 3992 }
3995 advw = 0;
3996 if (fmt->font.font)
3997 advw = ENFN->font_h_advance_get(ENDT, fmt->font.font,
3998 &ti->text_props);
3999 3993
4000 /* These adjustments are calculated and thus heavily linked to those in 3994 /* These adjustments are calculated and thus heavily linked to those in
4001 * textblock_render!!! Don't change one without the other. */ 3995 * textblock_render!!! Don't change one without the other. */
@@ -4059,10 +4053,8 @@ _text_item_update_sizes(Ctxt *c, Evas_Object_Textblock_Text_Item *ti)
4059 shx2 += shad_sz; 4053 shx2 += shad_sz;
4060 if (shx1 < minx) minx = shx1; 4054 if (shx1 < minx) minx = shx1;
4061 if (shx2 > maxx) maxx = shx2; 4055 if (shx2 > maxx) maxx = shx2;
4062 inset += -minx;
4063 ti->x_adjustment = maxx - minx; 4056 ti->x_adjustment = maxx - minx;
4064 4057
4065 ti->inset = inset;
4066 ti->parent.w = tw + ti->x_adjustment; 4058 ti->parent.w = tw + ti->x_adjustment;
4067 ti->parent.h = th; 4059 ti->parent.h = th;
4068 ti->parent.adv = advw; 4060 ti->parent.adv = advw;