summaryrefslogtreecommitdiff
path: root/src/lib/edje/edje_calc.c
diff options
context:
space:
mode:
authorThiep Ha <thiepha@gmail.com>2017-10-18 10:51:49 +0900
committerThiep Ha <thiepha@gmail.com>2017-10-18 10:51:49 +0900
commit6597b89f53abf99719cbc2bc06d9daa61b08ca94 (patch)
tree525757b77083887a6afec1f7aa3dccf595560442 /src/lib/edje/edje_calc.c
parent65a87eb575408bc316c778d1d6cd88696cbb117b (diff)
edje: correct the usage of EINA_SIZE2D
The usage of EINA_SIZE2D macro as left hand side variable does not save the size value. The Eina_Size2D should be used.
Diffstat (limited to 'src/lib/edje/edje_calc.c')
-rw-r--r--src/lib/edje/edje_calc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c
index fc71bad49a..5a01da863f 100644
--- a/src/lib/edje/edje_calc.c
+++ b/src/lib/edje/edje_calc.c
@@ -2116,7 +2116,7 @@ _edje_part_recalc_single_text(FLOAT_T sc EINA_UNUSED,
2116 { 2116 {
2117 const char *text; 2117 const char *text;
2118 const char *font; 2118 const char *font;
2119 Evas_Coord tw, th; 2119 Eina_Size2D ts;
2120 int inlined_font = 0; 2120 int inlined_font = 0;
2121 Edje_Real_Part *source, *text_source; 2121 Edje_Real_Part *source, *text_source;
2122 2122
@@ -2247,33 +2247,33 @@ _edje_part_recalc_single_text(FLOAT_T sc EINA_UNUSED,
2247 2247
2248 evas_obj_text_style_set(ep->object, style); 2248 evas_obj_text_style_set(ep->object, style);
2249 evas_obj_text_set(ep->object, text); 2249 evas_obj_text_set(ep->object, text);
2250 EINA_SIZE2D(tw, th) = efl_gfx_size_get(ep->object); 2250 ts = efl_gfx_size_get(ep->object);
2251 if (chosen_desc->text.max_x) 2251 if (chosen_desc->text.max_x)
2252 { 2252 {
2253 int l, r; 2253 int l, r;
2254 evas_object_text_style_pad_get(ep->object, &l, &r, NULL, NULL); 2254 evas_object_text_style_pad_get(ep->object, &l, &r, NULL, NULL);
2255 mw = tw + l + r; 2255 mw = ts.w + l + r;
2256 if ((*maxw < 0) || (mw < *maxw)) *maxw = mw; 2256 if ((*maxw < 0) || (mw < *maxw)) *maxw = mw;
2257 } 2257 }
2258 if (chosen_desc->text.max_y) 2258 if (chosen_desc->text.max_y)
2259 { 2259 {
2260 int t, b; 2260 int t, b;
2261 evas_object_text_style_pad_get(ep->object, NULL, NULL, &t, &b); 2261 evas_object_text_style_pad_get(ep->object, NULL, NULL, &t, &b);
2262 mh = th + t + b; 2262 mh = ts.h + t + b;
2263 if ((*maxh < 0) || (mh < *maxh)) *maxh = mh; 2263 if ((*maxh < 0) || (mh < *maxh)) *maxh = mh;
2264 } 2264 }
2265 if (chosen_desc->text.min_x) 2265 if (chosen_desc->text.min_x)
2266 { 2266 {
2267 int l, r; 2267 int l, r;
2268 evas_object_text_style_pad_get(ep->object, &l, &r, NULL, NULL); 2268 evas_object_text_style_pad_get(ep->object, &l, &r, NULL, NULL);
2269 mw = tw + l + r; 2269 mw = ts.w + l + r;
2270 if (mw > *minw) *minw = mw; 2270 if (mw > *minw) *minw = mw;
2271 } 2271 }
2272 if (chosen_desc->text.min_y) 2272 if (chosen_desc->text.min_y)
2273 { 2273 {
2274 int t, b; 2274 int t, b;
2275 evas_object_text_style_pad_get(ep->object, NULL, NULL, &t, &b); 2275 evas_object_text_style_pad_get(ep->object, NULL, NULL, &t, &b);
2276 mh = th + t + b; 2276 mh = ts.h + t + b;
2277 if (mh > *minh) *minh = mh; 2277 if (mh > *minh) *minh = mh;
2278 } 2278 }
2279 } 2279 }