summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-11-11 12:10:32 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-11-11 12:10:32 +0900
commit75daddc83999403c74cab7b1ed1f8fc3405fd025 (patch)
tree4e13c65381abbbec7ab7f3c412d6e874075bbeda /src
parentb5333edd3ffe8c0379170a0e9d08ee05af439e2c (diff)
Revert "Edje: use textblock by default"
This reverts commit ef3d2120bfa58f9247a441602bd30f13cc7f225a. This breaks E. pager ono my right screen looks like: http://devs.enlightenment.org/~raster/shot-2017-11-11_12-13-14.png on my left screen shellf keeps swapping between 2 dizes wobbling back and forth every frame eating cpu and making it "blurry"... note - theme is the flat one in devs/raster/theme/flat2 branch. so this change certainly breaks something...
Diffstat (limited to 'src')
-rw-r--r--src/lib/edje/edje_calc.c34
-rw-r--r--src/lib/edje/edje_load.c22
-rw-r--r--src/lib/edje/edje_private.h5
-rw-r--r--src/lib/edje/edje_textblock.c639
-rw-r--r--src/lib/edje/edje_util.c11
5 files changed, 188 insertions, 523 deletions
diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c
index be7d9e49b0..1442cb8f14 100644
--- a/src/lib/edje/edje_calc.c
+++ b/src/lib/edje/edje_calc.c
@@ -2401,7 +2401,7 @@ _edje_part_recalc_single_filter(Edje *ed,
2401 Eina_List *li1, *li2; 2401 Eina_List *li1, *li2;
2402 2402
2403 /* handle TEXT, IMAGE, PROXY, SNAPSHOT part types here */ 2403 /* handle TEXT, IMAGE, PROXY, SNAPSHOT part types here */
2404 if (PART_IS_TEXT(ed, ep)) 2404 if (ep->part->type == EDJE_PART_TYPE_TEXT)
2405 { 2405 {
2406 Edje_Part_Description_Text *chosen_edt = (Edje_Part_Description_Text *) chosen_desc; 2406 Edje_Part_Description_Text *chosen_edt = (Edje_Part_Description_Text *) chosen_desc;
2407 Edje_Part_Description_Text *edt = (Edje_Part_Description_Text *) desc; 2407 Edje_Part_Description_Text *edt = (Edje_Part_Description_Text *) desc;
@@ -2521,10 +2521,6 @@ _edje_part_recalc_single_filter(Edje *ed,
2521 } 2521 }
2522 } 2522 }
2523 efl_gfx_filter_program_set(obj, code, filter->name); 2523 efl_gfx_filter_program_set(obj, code, filter->name);
2524 if (PART_IS_TEXT(ed, ep))
2525 {
2526 efl_text_gfx_filter_set(obj, filter->name);
2527 }
2528 if (prev_sources != filter_sources) 2524 if (prev_sources != filter_sources)
2529 { 2525 {
2530 /* remove sources that are not there anymore 2526 /* remove sources that are not there anymore
@@ -2832,9 +2828,11 @@ _edje_part_recalc_single(Edje *ed,
2832 } 2828 }
2833 2829
2834 /* if we have text that wants to make the min size the text size... */ 2830 /* if we have text that wants to make the min size the text size... */
2835 if (PART_IS_TEXT(ed, ep)) 2831 if (ep->part->type == EDJE_PART_TYPE_TEXTBLOCK)
2832 _edje_part_recalc_single_textblock(sc, ed, ep, (Edje_Part_Description_Text *)chosen_desc, params, &minw, &minh, &maxw, &maxh);
2833 else if (ep->part->type == EDJE_PART_TYPE_TEXT)
2836 { 2834 {
2837 _edje_part_recalc_single_textblock(sc, ed, ep, (Edje_Part_Description_Text *)chosen_desc, params, &minw, &minh, &maxw, &maxh); 2835 _edje_part_recalc_single_text(sc, ed, ep, (Edje_Part_Description_Text*) desc, (Edje_Part_Description_Text*) chosen_desc, params, &minw, &minh, &maxw, &maxh);
2838 _edje_part_recalc_single_filter(ed, ep, desc, chosen_desc, pos); 2836 _edje_part_recalc_single_filter(ed, ep, desc, chosen_desc, pos);
2839 } 2837 }
2840 2838
@@ -4387,6 +4385,11 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
4387 break; 4385 break;
4388 4386
4389 case EDJE_PART_TYPE_TEXT: 4387 case EDJE_PART_TYPE_TEXT:
4388 _edje_calc_params_need_type_text(p3);
4389 p3->type.text->size = INTP(p1->type.text->size, p2->type.text->size, pos);
4390 EINA_FALLTHROUGH;
4391
4392 /* no break as we share code with the TEXTBLOCK type here. */
4390 case EDJE_PART_TYPE_TEXTBLOCK: 4393 case EDJE_PART_TYPE_TEXTBLOCK:
4391 _edje_calc_params_need_type_text(p3); 4394 _edje_calc_params_need_type_text(p3);
4392 p3->type.text->color2.r = INTP(p1->type.text->color2.r, p2->type.text->color2.r, pos2); 4395 p3->type.text->color2.r = INTP(p1->type.text->color2.r, p2->type.text->color2.r, pos2);
@@ -4598,8 +4601,6 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
4598 EINA_FALLTHROUGH; 4601 EINA_FALLTHROUGH;
4599 case EDJE_PART_TYPE_RECTANGLE: 4602 case EDJE_PART_TYPE_RECTANGLE:
4600 EINA_FALLTHROUGH; 4603 EINA_FALLTHROUGH;
4601 case EDJE_PART_TYPE_TEXT:
4602 EINA_FALLTHROUGH;
4603 case EDJE_PART_TYPE_TEXTBLOCK: 4604 case EDJE_PART_TYPE_TEXTBLOCK:
4604 EINA_FALLTHROUGH; 4605 EINA_FALLTHROUGH;
4605 case EDJE_PART_TYPE_BOX: 4606 case EDJE_PART_TYPE_BOX:
@@ -4609,18 +4610,11 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
4609 case EDJE_PART_TYPE_SNAPSHOT: 4610 case EDJE_PART_TYPE_SNAPSHOT:
4610 EINA_FALLTHROUGH; 4611 EINA_FALLTHROUGH;
4611 case EDJE_PART_TYPE_VECTOR: 4612 case EDJE_PART_TYPE_VECTOR:
4612 if (ep->part->type == EDJE_PART_TYPE_TEXT)
4613 {
4614 evas_object_color_set(ep->object, 255, 255, 255, 255);
4615 }
4616 else
4617 {
4618 evas_object_color_set(ep->object, 4613 evas_object_color_set(ep->object,
4619 (pf->color.r * pf->color.a) / 255, 4614 (pf->color.r * pf->color.a) / 255,
4620 (pf->color.g * pf->color.a) / 255, 4615 (pf->color.g * pf->color.a) / 255,
4621 (pf->color.b * pf->color.a) / 255, 4616 (pf->color.b * pf->color.a) / 255,
4622 pf->color.a); 4617 pf->color.a);
4623 }
4624 4618
4625#ifdef HAVE_EPHYSICS 4619#ifdef HAVE_EPHYSICS
4626/* body attributes should be updated for invisible objects */ 4620/* body attributes should be updated for invisible objects */
@@ -4708,6 +4702,10 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
4708 } 4702 }
4709 break; 4703 break;
4710 4704
4705 case EDJE_PART_TYPE_TEXT:
4706 /* This is correctly handle in _edje_text_recalc_apply at the moment. */
4707 break;
4708
4711 case EDJE_PART_TYPE_GRADIENT: 4709 case EDJE_PART_TYPE_GRADIENT:
4712 /* FIXME: definitivly remove this code when we switch to new format. */ 4710 /* FIXME: definitivly remove this code when we switch to new format. */
4713 abort(); 4711 abort();
@@ -4912,6 +4910,9 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
4912 /* Some object need special recalc. */ 4910 /* Some object need special recalc. */
4913 switch (ep->part->type) 4911 switch (ep->part->type)
4914 { 4912 {
4913 case EDJE_PART_TYPE_TEXT:
4914 _edje_text_recalc_apply(ed, ep, pf, (Edje_Part_Description_Text*) chosen_desc, EINA_FALSE);
4915 break;
4915 4916
4916 case EDJE_PART_TYPE_PROXY: 4917 case EDJE_PART_TYPE_PROXY:
4917 _edje_proxy_recalc_apply(ed, ep, pf, (Edje_Part_Description_Proxy *)chosen_desc, pos); 4918 _edje_proxy_recalc_apply(ed, ep, pf, (Edje_Part_Description_Proxy *)chosen_desc, pos);
@@ -4929,7 +4930,6 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
4929 _edje_table_recalc_apply(ed, ep, pf, (Edje_Part_Description_Table *)chosen_desc); 4930 _edje_table_recalc_apply(ed, ep, pf, (Edje_Part_Description_Table *)chosen_desc);
4930 break; 4931 break;
4931 4932
4932 case EDJE_PART_TYPE_TEXT:
4933 case EDJE_PART_TYPE_TEXTBLOCK: 4933 case EDJE_PART_TYPE_TEXTBLOCK:
4934 _edje_textblock_recalc_apply(ed, ep, pf, (Edje_Part_Description_Text *)chosen_desc); 4934 _edje_textblock_recalc_apply(ed, ep, pf, (Edje_Part_Description_Text *)chosen_desc);
4935 break; 4935 break;
diff --git a/src/lib/edje/edje_load.c b/src/lib/edje/edje_load.c
index c2da41d884..94f8c0e401 100644
--- a/src/lib/edje/edje_load.c
+++ b/src/lib/edje/edje_load.c
@@ -1045,21 +1045,11 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
1045 break; 1045 break;
1046 1046
1047 case EDJE_PART_TYPE_TEXT: 1047 case EDJE_PART_TYPE_TEXT:
1048 case EDJE_PART_TYPE_TEXTBLOCK: 1048 _edje_text_part_on_add(ed, rp);
1049 _edje_textblock_styles_add(ed, rp); 1049 rp->object = evas_object_text_add(ed->base.evas);
1050 textblocks = eina_list_append(textblocks, rp); 1050 evas_object_text_font_source_set(rp->object, ed->path);
1051 if (rp->part->type == EDJE_PART_TYPE_TEXT)
1052 {
1053 rp->object = efl_add(EFL_CANVAS_TEXT_CLASS,
1054 ed->base.evas);
1055 }
1056 else
1057 {
1058 rp->object = evas_object_textblock_add(ed->base.evas);
1059 }
1060 break; 1051 break;
1061 1052
1062
1063 case EDJE_PART_TYPE_GROUP: 1053 case EDJE_PART_TYPE_GROUP:
1064 sources = eina_list_append(sources, rp); 1054 sources = eina_list_append(sources, rp);
1065 1055
@@ -1077,6 +1067,12 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
1077 _edje_callbacks_focus_add(rp->object, ed, rp); 1067 _edje_callbacks_focus_add(rp->object, ed, rp);
1078 break; 1068 break;
1079 1069
1070 case EDJE_PART_TYPE_TEXTBLOCK:
1071 _edje_textblock_styles_add(ed, rp);
1072 textblocks = eina_list_append(textblocks, rp);
1073 rp->object = evas_object_textblock_add(ed->base.evas);
1074 break;
1075
1080 case EDJE_PART_TYPE_BOX: 1076 case EDJE_PART_TYPE_BOX:
1081 sources = eina_list_append(sources, rp); 1077 sources = eina_list_append(sources, rp);
1082 rp->object = evas_object_box_add(ed->base.evas); 1078 rp->object = evas_object_box_add(ed->base.evas);
diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h
index f17abdf81c..9f4d07ecab 100644
--- a/src/lib/edje/edje_private.h
+++ b/src/lib/edje/edje_private.h
@@ -2547,11 +2547,6 @@ const char * _edje_text_class_font_get(Edje *ed,
2547 int *size, char **free_later); 2547 int *size, char **free_later);
2548const char * _edje_text_font_get(const char *base, const char *new, 2548const char * _edje_text_font_get(const char *base, const char *new,
2549 char **free_later); 2549 char **free_later);
2550const char * _set_translated_string(Edje *ed, Edje_Real_Part *ep);
2551
2552#define PART_IS_TEXT(ed, ep) \
2553 (((ep)->part->type == EDJE_PART_TYPE_TEXTBLOCK) || \
2554 ((ep)->part->type == EDJE_PART_TYPE_TEXT))
2555 2550
2556void 2551void
2557_edje_part_recalc_single_textblock(FLOAT_T sc, 2552_edje_part_recalc_single_textblock(FLOAT_T sc,
diff --git a/src/lib/edje/edje_textblock.c b/src/lib/edje/edje_textblock.c
index c46c2a9543..0451099fa4 100644
--- a/src/lib/edje/edje_textblock.c
+++ b/src/lib/edje/edje_textblock.c
@@ -1,17 +1,5 @@
1#include "edje_private.h" 1#include "edje_private.h"
2 2
3#ifdef DEBUG_TEXT
4# define TPRN(...) do { printf(__VA_ARGS__); } while(0)
5#else
6# define TPRN(...)
7#endif
8
9#define COLOR_SET(color) \
10 (color).r * (color).a / 255, \
11 (color).g * (color).a / 255, \
12 (color).b * (color).a / 255, \
13 (color).a
14
15static double 3static double
16_edje_part_recalc_single_textblock_scale_range_adjust(Edje_Part_Description_Text *chosen_desc, double base_scale, double scale) 4_edje_part_recalc_single_textblock_scale_range_adjust(Edje_Part_Description_Text *chosen_desc, double base_scale, double scale)
17{ 5{
@@ -32,248 +20,6 @@ _edje_part_recalc_single_textblock_scale_range_adjust(Edje_Part_Description_Text
32 return scale; 20 return scale;
33} 21}
34 22
35static void
36_edje_part_recalc_textblock_font_get(Edje *ed, Edje_Real_Part *ep,
37 Edje_Part_Description_Text *chosen_desc,
38 const char **ret_font_source,
39 const char **ret_font, int *ret_size)
40
41{
42 Edje_Real_Part *source;
43 const char *font;
44 int size;
45 Eina_Bool inlined_font = EINA_FALSE;
46 const char *font_source = NULL;
47 char *sfont, *font2;
48
49 sfont = font2 = NULL;
50
51 source = ep->typedata.text->source;
52
53 if (source)
54 font = _edje_text_class_font_get(ed,
55 _edje_real_part_text_source_description_get(ep,
56 &source), &size, &sfont);
57 else
58 font = _edje_text_class_font_get(ed, chosen_desc, &size, &sfont);
59
60 if (size <= 0) size = 1;
61 if (!font) font = "";
62
63 if (source)
64 {
65 if (source->typedata.text->font) font = source->typedata.text->font;
66 if (source->typedata.text->size > 0) size = source->typedata.text->size;
67 }
68 else
69 {
70 if (ep->typedata.text->font) font = ep->typedata.text->font;
71 if (ep->typedata.text->size > 0) size = ep->typedata.text->size;
72 }
73
74 if (ed->file->fonts)
75 {
76 Edje_Font_Directory_Entry *fnt;
77
78 fnt = eina_hash_find(ed->file->fonts, font);
79
80 if (fnt)
81 {
82 size_t len = strlen(font) + sizeof("edje/fonts/") + 1;
83 font2 = alloca(len);
84 sprintf(font2, "edje/fonts/%s", font);
85 font = font2;
86 inlined_font = 1;
87 font2 = NULL; // so it is not freed at the end of the function
88 }
89 }
90 if (inlined_font)
91 {
92 font_source = ed->path;
93 }
94
95 if ((_edje_fontset_append) && (font))
96 {
97 font2 = malloc(strlen(font) + 1 + strlen(_edje_fontset_append) + 1);
98 if (font2)
99 {
100 strcpy(font2, font);
101 strcat(font2, ",");
102 strcat(font2, _edje_fontset_append);
103 font = font2; //font2 needs to be freed at the end of the
104 // function.
105 }
106 }
107 if (ret_font) *ret_font = font;
108 if (ret_size) *ret_size = size;
109 if (ret_font_source) *ret_font_source = font_source;
110
111 if (font2) free(font2);
112 if (sfont) free(sfont);
113}
114
115static inline Eina_Bool
116_edje_part_recalc_textblock_text_get(Edje *ed, Edje_Real_Part *ep,
117 Edje_Part_Description_Text *chosen_desc, const char **_ret)
118{
119 Eina_Bool same = EINA_FALSE;
120 const char *text = NULL;
121
122 if (chosen_desc->text.domain)
123 {
124 if (!chosen_desc->text.text.translated)
125 chosen_desc->text.text.translated = _set_translated_string(ed, ep);
126 if (chosen_desc->text.text.translated)
127 text = chosen_desc->text.text.translated;
128 }
129
130 if (!text)
131 {
132 text = edje_string_get(&chosen_desc->text.text);
133 if (ep->typedata.text->text) text = ep->typedata.text->text;
134 }
135
136 if (chosen_desc->text.id_text_source >= 0)
137 {
138 Edje_Part_Description_Text *et;
139 Edje_Real_Part *rp;
140 ep->typedata.text->text_source = ed->table_parts[chosen_desc->text.id_text_source % ed->table_parts_size];
141
142 et = _edje_real_part_text_text_source_description_get(ep, &rp);
143 text = edje_string_get(&(et->text.text));
144
145 if (rp->typedata.text->text) text = rp->typedata.text->text;
146 }
147
148 if ((text == ep->typedata.text->cache.in_str)
149 || (text && ep->typedata.text->cache.in_str && !strcmp(ep->typedata.text->cache.in_str, text)))
150 {
151 text = ep->typedata.text->cache.in_str;
152 same = EINA_TRUE;
153 }
154
155 if (!same)
156 {
157 eina_stringshare_replace(&ep->typedata.text->cache.in_str, text);
158 }
159
160 *_ret = text;
161 return same;
162}
163
164static inline Edje_Style *
165_edje_part_recalc_textblock_style_get(Edje *ed, Edje_Real_Part *ep,
166 Edje_Part_Description_Text *chosen_desc)
167{
168 Edje_Style *stl = NULL;
169 const char *tmp, *style = "";
170 Eina_List *l;
171
172 if (chosen_desc->text.id_source >= 0)
173 {
174 Edje_Part_Description_Text *et;
175
176 ep->typedata.text->source = ed->table_parts[chosen_desc->text.id_source % ed->table_parts_size];
177
178 et = _edje_real_part_text_source_description_get(ep, NULL);
179 tmp = edje_string_get(&et->text.style);
180 if (tmp) style = tmp;
181 }
182 else
183 {
184 ep->typedata.text->source = NULL;
185
186 tmp = edje_string_get(&chosen_desc->text.style);
187 if (tmp) style = tmp;
188 }
189
190 EINA_LIST_FOREACH(ed->file->styles, l, stl)
191 {
192 if ((stl->name) && (!strcmp(stl->name, style))) break;
193 stl = NULL;
194 }
195
196 return stl;
197}
198
199static inline void
200_edje_part_recalc_textblock_fit(Edje_Real_Part *ep,
201 Edje_Part_Description_Text *chosen_desc,
202 Edje_Calc_Params *params,
203 FLOAT_T sc, Evas_Coord *tw, Evas_Coord *th)
204{
205 double base_s = 1.0;
206 double orig_s;
207 double s = base_s;
208
209 if (ep->part->scale) base_s = TO_DOUBLE(sc);
210 efl_canvas_object_scale_set(ep->object, base_s);
211 efl_canvas_text_size_native_get(ep->object, tw, th);
212
213 orig_s = base_s;
214 /* Now make it bigger so calculations will be more accurate
215 * and less influenced by hinting... */
216 {
217 orig_s = _edje_part_recalc_single_textblock_scale_range_adjust(chosen_desc, base_s,
218 orig_s * TO_INT(params->eval.w) / *tw);
219 efl_canvas_object_scale_set(ep->object, orig_s);
220 efl_canvas_text_size_native_get(ep->object, tw, th);
221 }
222 if (chosen_desc->text.fit_x)
223 {
224 if (*tw > 0)
225 {
226 s = _edje_part_recalc_single_textblock_scale_range_adjust(chosen_desc, base_s,
227 orig_s * TO_INT(params->eval.w) / *tw);
228 efl_canvas_object_scale_set(ep->object, s);
229 efl_canvas_text_size_native_get(ep->object, NULL, NULL);
230 }
231 }
232 if (chosen_desc->text.fit_y)
233 {
234 if (*th > 0)
235 {
236 double tmp_s = _edje_part_recalc_single_textblock_scale_range_adjust(chosen_desc, base_s,
237 orig_s * TO_INT(params->eval.h) / *th);
238 /* If we already have X fit, restrict Y to be no bigger
239 * than what we got with X. */
240 if (!((chosen_desc->text.fit_x) && (tmp_s > s)))
241 {
242 s = tmp_s;
243 }
244
245 efl_canvas_object_scale_set(ep->object, s);
246 efl_canvas_text_size_native_get(ep->object, NULL, NULL);
247 }
248 }
249
250 /* Final tuning, try going down 90% at a time, hoping it'll
251 * actually end up being correct. */
252 {
253 int i = 5; /* Tries before we give up. */
254 Evas_Coord fw, fh;
255 efl_canvas_text_size_native_get(ep->object, &fw, &fh);
256
257 /* If we are still too big, try reducing the size to
258 * 95% each try. */
259 while ((i > 0) &&
260 ((chosen_desc->text.fit_x && (fw > TO_INT(params->eval.w))) ||
261 (chosen_desc->text.fit_y && (fh > TO_INT(params->eval.h)))))
262 {
263 double tmp_s = _edje_part_recalc_single_textblock_scale_range_adjust(chosen_desc, base_s, s * 0.95);
264
265 /* Break if we are not making any progress. */
266 if (EQ(tmp_s, s))
267 break;
268 s = tmp_s;
269
270 efl_canvas_object_scale_set(ep->object, s);
271 efl_canvas_text_size_native_get(ep->object, &fw, &fh);
272 i--;
273 }
274 }
275}
276
277/* 23/*
278 * Legacy function for min/max calculation of textblock part. 24 * Legacy function for min/max calculation of textblock part.
279 * It can't calculate min/max properly in many cases. 25 * It can't calculate min/max properly in many cases.
@@ -289,7 +35,6 @@ _edje_part_recalc_single_textblock_min_max_calc_legacy(Edje_Real_Part *ep,
289 int *maxw, int *maxh) 35 int *maxw, int *maxh)
290{ 36{
291 Evas_Coord tw, th, ins_l, ins_r, ins_t, ins_b; 37 Evas_Coord tw, th, ins_l, ins_r, ins_t, ins_b;
292 ins_l = ins_r = ins_t = ins_b = 0;
293 38
294 /* Legacy code for Textblock min/max calculation */ 39 /* Legacy code for Textblock min/max calculation */
295 if ((chosen_desc->text.min_x) || (chosen_desc->text.min_y)) 40 if ((chosen_desc->text.min_x) || (chosen_desc->text.min_y))
@@ -304,10 +49,8 @@ _edje_part_recalc_single_textblock_min_max_calc_legacy(Edje_Real_Part *ep,
304 } 49 }
305 else 50 else
306 evas_object_textblock_size_native_get(ep->object, &tw, &th); 51 evas_object_textblock_size_native_get(ep->object, &tw, &th);
307
308 evas_object_textblock_style_insets_get(ep->object, &ins_l, 52 evas_object_textblock_style_insets_get(ep->object, &ins_l,
309 &ins_r, &ins_t, &ins_b); 53 &ins_r, &ins_t, &ins_b);
310
311 mw = ins_l + tw + ins_r; 54 mw = ins_l + tw + ins_r;
312 mh = ins_t + th + ins_b; 55 mh = ins_t + th + ins_b;
313 if (minw && chosen_desc->text.min_x) 56 if (minw && chosen_desc->text.min_x)
@@ -332,10 +75,8 @@ _edje_part_recalc_single_textblock_min_max_calc_legacy(Edje_Real_Part *ep,
332 } 75 }
333 else 76 else
334 evas_object_textblock_size_native_get(ep->object, &tw, &th); 77 evas_object_textblock_size_native_get(ep->object, &tw, &th);
335 78 evas_object_textblock_style_insets_get(ep->object, &ins_l, &ins_r,
336 evas_object_textblock_style_insets_get(ep->object, &ins_l, 79 &ins_t, &ins_b);
337 &ins_r, &ins_t, &ins_b);
338
339 mw = ins_l + tw + ins_r; 80 mw = ins_l + tw + ins_r;
340 mh = ins_t + th + ins_b; 81 mh = ins_t + th + ins_b;
341 if (maxw && chosen_desc->text.max_x) 82 if (maxw && chosen_desc->text.max_x)
@@ -360,25 +101,19 @@ _edje_part_recalc_single_textblock_min_max_calc(Edje_Real_Part *ep,
360{ 101{
361 Evas_Coord tw, th, ins_l, ins_r, ins_t, ins_b; 102 Evas_Coord tw, th, ins_l, ins_r, ins_t, ins_b;
362 Evas_Coord min_calc_w = 0, min_calc_h = 0; 103 Evas_Coord min_calc_w = 0, min_calc_h = 0;
363 unsigned char dmin_x, dmin_y;
364
365 ins_l = ins_r = ins_t = ins_b = 0;
366 104
367 /* min_calc_* values need to save calculated minumum size 105 /* min_calc_* values need to save calculated minumum size
368 * for maximum size calculation */ 106 * for maximum size calculation */
369 if (minw) min_calc_w = *minw; 107 if (minw) min_calc_w = *minw;
370 if (minh) min_calc_h = *minh; 108 if (minh) min_calc_h = *minh;
371 109
372 dmin_x = chosen_desc->text.min_x; 110 if ((chosen_desc->text.min_x) || (chosen_desc->text.min_y))
373 dmin_y = chosen_desc->text.min_y;
374
375 if (dmin_x || dmin_y)
376 { 111 {
377 evas_object_textblock_style_insets_get(ep->object, &ins_l, 112 evas_object_textblock_style_insets_get(ep->object, &ins_l,
378 &ins_r, &ins_t, &ins_b); 113 &ins_r, &ins_t, &ins_b);
379 114
380 tw = th = 0; 115 tw = th = 0;
381 if (!dmin_x) 116 if (!chosen_desc->text.min_x)
382 { 117 {
383 /* text.min: 0 1 118 /* text.min: 0 1
384 * text.max: X X */ 119 * text.max: X X */
@@ -426,7 +161,7 @@ _edje_part_recalc_single_textblock_min_max_calc(Edje_Real_Part *ep,
426 { 161 {
427 /* text.min: 1 X 162 /* text.min: 1 X
428 * text.max: X X */ 163 * text.max: X X */
429 if (dmin_y && (!chosen_desc->text.max_x) && 164 if (chosen_desc->text.min_y && (!chosen_desc->text.max_x) &&
430 maxw && (*maxw > -1)) 165 maxw && (*maxw > -1))
431 { 166 {
432 /* text.min: 1 1 167 /* text.min: 1 1
@@ -487,14 +222,14 @@ _edje_part_recalc_single_textblock_min_max_calc(Edje_Real_Part *ep,
487 222
488 if (tw > min_calc_w) min_calc_w = tw; 223 if (tw > min_calc_w) min_calc_w = tw;
489 if (th > min_calc_h) min_calc_h = th; 224 if (th > min_calc_h) min_calc_h = th;
490 if (dmin_x && minw) *minw = min_calc_w; 225 if (chosen_desc->text.min_x && minw) *minw = min_calc_w;
491 if (dmin_y && minh) *minh = min_calc_h; 226 if (chosen_desc->text.min_y && minh) *minh = min_calc_h;
492 } 227 }
493 228
494 if ((chosen_desc->text.max_x) || (chosen_desc->text.max_y)) 229 if ((chosen_desc->text.max_x) || (chosen_desc->text.max_y))
495 { 230 {
496 evas_object_textblock_style_insets_get(ep->object, &ins_l, 231 evas_object_textblock_style_insets_get(ep->object, &ins_l, &ins_r,
497 &ins_r, &ins_t, &ins_b); 232 &ins_t, &ins_b);
498 233
499 tw = th = 0; 234 tw = th = 0;
500 if (!chosen_desc->text.max_x) 235 if (!chosen_desc->text.max_x)
@@ -549,7 +284,7 @@ _edje_part_recalc_single_textblock_min_max_calc(Edje_Real_Part *ep,
549 else 284 else
550 { 285 {
551 /* text.max: 1 X */ 286 /* text.max: 1 X */
552 if (dmin_x) 287 if (chosen_desc->text.min_x)
553 { 288 {
554 /* text.min: 1 X 289 /* text.min: 1 X
555 * text.max: 1 X 290 * text.max: 1 X
@@ -577,7 +312,7 @@ _edje_part_recalc_single_textblock_min_max_calc(Edje_Real_Part *ep,
577 if (min_calc_h > temp_h) 312 if (min_calc_h > temp_h)
578 temp_h = min_calc_h; 313 temp_h = min_calc_h;
579 314
580 if (dmin_y) 315 if (chosen_desc->text.min_y)
581 { 316 {
582 /* text.min: 0 1 317 /* text.min: 0 1
583 * text.max: 1 1 318 * text.max: 1 1
@@ -648,147 +383,6 @@ _edje_part_recalc_single_textblock_min_max_calc(Edje_Real_Part *ep,
648 } 383 }
649} 384}
650 385
651static void
652_edje_textblock_colors_set(Edje *ed EINA_UNUSED,
653 Edje_Real_Part *ep,
654 Edje_Calc_Params *params,
655 Eina_Bool styles)
656{
657
658 Edje_Text_Effect effect;
659 Efl_Text_Style_Effect_Type st;
660 Efl_Text_Style_Shadow_Direction dir;
661
662 if (ep->part->type == EDJE_PART_TYPE_TEXT)
663 {
664 efl_text_normal_color_set(ep->object, COLOR_SET(params->color));
665 evas_object_color_set(ep->object, 255, 255, 255, 255);
666 }
667
668 effect = ep->part->effect;
669 switch (effect & EDJE_TEXT_EFFECT_MASK_BASIC)
670 {
671 case EDJE_TEXT_EFFECT_NONE:
672 case EDJE_TEXT_EFFECT_PLAIN:
673 st = EFL_TEXT_STYLE_EFFECT_TYPE_NONE;
674 break;
675
676 case EDJE_TEXT_EFFECT_OUTLINE:
677 st = EFL_TEXT_STYLE_EFFECT_TYPE_OUTLINE;
678 if (styles) efl_text_outline_color_set(ep->object,
679 COLOR_SET(params->type.text->color2));
680 break;
681
682 case EDJE_TEXT_EFFECT_SOFT_OUTLINE:
683 st = EFL_TEXT_STYLE_EFFECT_TYPE_SOFT_OUTLINE;
684 if (styles) efl_text_outline_color_set(ep->object,
685 COLOR_SET(params->type.text->color2));
686 break;
687
688 case EDJE_TEXT_EFFECT_SHADOW:
689 st = EFL_TEXT_STYLE_EFFECT_TYPE_SHADOW;
690 if (styles) efl_text_shadow_color_set(ep->object,
691 COLOR_SET(params->type.text->color3));
692 break;
693
694 case EDJE_TEXT_EFFECT_SOFT_SHADOW:
695 st = EFL_TEXT_STYLE_EFFECT_TYPE_SOFT_SHADOW;
696 if (styles) efl_text_shadow_color_set(ep->object,
697 COLOR_SET(params->type.text->color3));
698 break;
699
700 case EDJE_TEXT_EFFECT_OUTLINE_SHADOW:
701 st = EFL_TEXT_STYLE_EFFECT_TYPE_OUTLINE_SHADOW;
702 if (styles)
703 {
704 efl_text_outline_color_set(ep->object,
705 COLOR_SET(params->type.text->color2));
706 efl_text_shadow_color_set(ep->object,
707 COLOR_SET(params->type.text->color3));
708 }
709 break;
710
711 case EDJE_TEXT_EFFECT_OUTLINE_SOFT_SHADOW:
712 st = EFL_TEXT_STYLE_EFFECT_TYPE_OUTLINE_SOFT_SHADOW;
713 if (styles)
714 {
715 efl_text_outline_color_set(ep->object,
716 COLOR_SET(params->type.text->color2));
717 efl_text_shadow_color_set(ep->object,
718 COLOR_SET(params->type.text->color3));
719 }
720 break;
721
722 case EDJE_TEXT_EFFECT_FAR_SHADOW:
723 st = EFL_TEXT_STYLE_EFFECT_TYPE_FAR_SHADOW;
724 if (styles) efl_text_shadow_color_set(ep->object,
725 COLOR_SET(params->type.text->color3));
726 break;
727
728 case EDJE_TEXT_EFFECT_FAR_SOFT_SHADOW:
729 st = EFL_TEXT_STYLE_EFFECT_TYPE_FAR_SOFT_SHADOW;
730 if (styles) efl_text_shadow_color_set(ep->object,
731 COLOR_SET(params->type.text->color3));
732 break;
733
734 case EDJE_TEXT_EFFECT_GLOW:
735 st = EFL_TEXT_STYLE_EFFECT_TYPE_GLOW;
736 if (styles)
737 {
738 efl_text_glow_color_set(ep->object,
739 COLOR_SET(params->type.text->color2));
740 efl_text_glow2_color_set(ep->object,
741 COLOR_SET(params->type.text->color3));
742 }
743 break;
744
745 default:
746 st = EFL_TEXT_STYLE_EFFECT_TYPE_NONE;
747 break;
748 }
749
750 switch (effect & EDJE_TEXT_EFFECT_MASK_SHADOW_DIRECTION)
751 {
752 case EDJE_TEXT_EFFECT_SHADOW_DIRECTION_BOTTOM_RIGHT:
753 dir = EFL_TEXT_STYLE_SHADOW_DIRECTION_RIGHT;
754 break;
755
756 case EDJE_TEXT_EFFECT_SHADOW_DIRECTION_BOTTOM:
757 dir = EFL_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM;
758 break;
759
760 case EDJE_TEXT_EFFECT_SHADOW_DIRECTION_BOTTOM_LEFT:
761 dir = EFL_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_LEFT;
762 break;
763
764 case EDJE_TEXT_EFFECT_SHADOW_DIRECTION_LEFT:
765 dir = EFL_TEXT_STYLE_SHADOW_DIRECTION_LEFT;
766 break;
767
768 case EDJE_TEXT_EFFECT_SHADOW_DIRECTION_TOP_LEFT:
769 dir = EFL_TEXT_STYLE_SHADOW_DIRECTION_TOP_LEFT;
770 break;
771
772 case EDJE_TEXT_EFFECT_SHADOW_DIRECTION_TOP:
773 dir = EFL_TEXT_STYLE_SHADOW_DIRECTION_TOP;
774 break;
775
776 case EDJE_TEXT_EFFECT_SHADOW_DIRECTION_TOP_RIGHT:
777 dir = EFL_TEXT_STYLE_SHADOW_DIRECTION_TOP_RIGHT;
778 break;
779
780 case EDJE_TEXT_EFFECT_SHADOW_DIRECTION_RIGHT:
781 dir = EFL_TEXT_STYLE_SHADOW_DIRECTION_RIGHT;
782 break;
783
784 default:
785 dir = EFL_TEXT_STYLE_SHADOW_DIRECTION_TOP;
786 break;
787 }
788 efl_text_effect_type_set(ep->object, st);
789 efl_text_shadow_direction_set(ep->object, dir);
790}
791
792void 386void
793_edje_part_recalc_single_textblock(FLOAT_T sc, 387_edje_part_recalc_single_textblock(FLOAT_T sc,
794 Edje *ed, 388 Edje *ed,
@@ -798,97 +392,172 @@ _edje_part_recalc_single_textblock(FLOAT_T sc,
798 int *minw, int *minh, 392 int *minw, int *minh,
799 int *maxw, int *maxh) 393 int *maxw, int *maxh)
800{ 394{
801 double align_y;
802
803 if ((ep->type != EDJE_RP_TYPE_TEXT) || 395 if ((ep->type != EDJE_RP_TYPE_TEXT) ||
804 (!ep->typedata.text)) 396 (!ep->typedata.text))
805 return; 397 return;
806
807 align_y = TO_DOUBLE(params->type.text->align.y);
808 efl_text_valign_set(ep->object, align_y);
809 398
810 if (ep->part->type == EDJE_PART_TYPE_TEXT) 399 if (chosen_desc)
811 { 400 {
812 double align_x; 401 Evas_Coord tw, th;
813 402 const char *text = "";
814 align_x = TO_DOUBLE(params->type.text->align.x); 403 const char *style = "";
404 Edje_Style *stl = NULL;
405 const char *tmp;
406 Eina_List *l;
815 407
816 if (align_x < 0) 408 if (chosen_desc->text.id_source >= 0)
817 { 409 {
818 efl_text_halign_auto_type_set(ep->object, 410 Edje_Part_Description_Text *et;
819 EFL_TEXT_HORIZONTAL_ALIGNMENT_AUTO_NORMAL); 411
412 ep->typedata.text->source = ed->table_parts[chosen_desc->text.id_source % ed->table_parts_size];
413
414 et = _edje_real_part_text_source_description_get(ep, NULL);
415 tmp = edje_string_get(&et->text.style);
416 if (tmp) style = tmp;
820 } 417 }
821 else 418 else
822 { 419 {
823 efl_text_halign_set(ep->object, align_x); 420 ep->typedata.text->source = NULL;
421
422 tmp = edje_string_get(&chosen_desc->text.style);
423 if (tmp) style = tmp;
824 } 424 }
825 }
826 425
827 if (chosen_desc) 426 if (chosen_desc->text.id_text_source >= 0)
828 { 427 {
829 const char *font, *font_source; 428 Edje_Part_Description_Text *et;
830 int size; 429 Edje_Real_Part *rp;
831 430
832 Evas_Coord tw, th; 431 ep->typedata.text->text_source = ed->table_parts[chosen_desc->text.id_text_source % ed->table_parts_size];
833 Edje_Style *stl = NULL; 432
834 const char *text; 433 et = _edje_real_part_text_text_source_description_get(ep, &rp);
434 text = edje_string_get(&et->text.text);
835 435
836 _edje_part_recalc_textblock_text_get(ed, ep, chosen_desc, 436 if (rp->typedata.text->text) text = rp->typedata.text->text;
837 &text); 437 }
438 else
439 {
440 ep->typedata.text->text_source = NULL;
441 text = edje_string_get(&chosen_desc->text.text);
442 if (ep->typedata.text->text) text = ep->typedata.text->text;
443 }
838 444
839 stl = _edje_part_recalc_textblock_style_get(ed, ep, chosen_desc); 445 EINA_LIST_FOREACH(ed->file->styles, l, stl)
446 {
447 if ((stl->name) && (!strcmp(stl->name, style))) break;
448 stl = NULL;
449 }
840 450
841 if (ep->part->scale) 451 if (ep->part->scale)
842 evas_object_scale_set(ep->object, TO_DOUBLE(sc)); 452 evas_object_scale_set(ep->object, TO_DOUBLE(sc));
843 453
844 if ((chosen_desc->text.fit_x) || (chosen_desc->text.fit_y)) 454 if ((chosen_desc->text.fit_x) || (chosen_desc->text.fit_y))
845 { 455 {
846 _edje_part_recalc_textblock_fit(ep, chosen_desc, params, sc, &tw, &th); 456 double base_s = 1.0;
847 } 457 double orig_s;
458 double s = base_s;
459
460 if (ep->part->scale) base_s = TO_DOUBLE(sc);
461 efl_canvas_object_scale_set(ep->object, base_s);
462 efl_canvas_text_size_native_get(ep->object, &tw, &th);
463
464 orig_s = base_s;
465 /* Now make it bigger so calculations will be more accurate
466 * and less influenced by hinting... */
467 {
468 orig_s = _edje_part_recalc_single_textblock_scale_range_adjust(chosen_desc, base_s,
469 orig_s * TO_INT(params->eval.w) / tw);
470 efl_canvas_object_scale_set(ep->object, orig_s);
471 efl_canvas_text_size_native_get(ep->object, &tw, &th);
472 }
473 if (chosen_desc->text.fit_x)
474 {
475 if (tw > 0)
476 {
477 s = _edje_part_recalc_single_textblock_scale_range_adjust(chosen_desc, base_s,
478 orig_s * TO_INT(params->eval.w) / tw);
479 efl_canvas_object_scale_set(ep->object, s);
480 efl_canvas_text_size_native_get(ep->object, NULL, NULL);
481 }
482 }
483 if (chosen_desc->text.fit_y)
484 {
485 if (th > 0)
486 {
487 double tmp_s = _edje_part_recalc_single_textblock_scale_range_adjust(chosen_desc, base_s,
488 orig_s * TO_INT(params->eval.h) / th);
489 /* If we already have X fit, restrict Y to be no bigger
490 * than what we got with X. */
491 if (!((chosen_desc->text.fit_x) && (tmp_s > s)))
492 {
493 s = tmp_s;
494 }
848 495
849 _edje_part_recalc_textblock_font_get(ed, ep, chosen_desc, 496 efl_canvas_object_scale_set(ep->object, s);
850 &font_source, &font, &size); 497 efl_canvas_text_size_native_get(ep->object, NULL, NULL);
498 }
499 }
500
501 /* Final tuning, try going down 90% at a time, hoping it'll
502 * actually end up being correct. */
503 {
504 int i = 5; /* Tries before we give up. */
505 Evas_Coord fw, fh;
506 efl_canvas_text_size_native_get(ep->object, &fw, &fh);
507
508 /* If we are still too big, try reducing the size to
509 * 95% each try. */
510 while ((i > 0) &&
511 ((chosen_desc->text.fit_x && (fw > TO_INT(params->eval.w))) ||
512 (chosen_desc->text.fit_y && (fh > TO_INT(params->eval.h)))))
513 {
514 double tmp_s = _edje_part_recalc_single_textblock_scale_range_adjust(chosen_desc, base_s, s * 0.95);
515
516 /* Break if we are not making any progress. */
517 if (EQ(tmp_s, s))
518 break;
519 s = tmp_s;
520
521 efl_canvas_object_scale_set(ep->object, s);
522 efl_canvas_text_size_native_get(ep->object, &fw, &fh);
523 i--;
524 }
525 }
526 }
851 527
852 if (stl) 528 if (stl)
853 { 529 {
854 if (evas_object_textblock_style_get(ep->object) != stl->style) 530 if (evas_object_textblock_style_get(ep->object) != stl->style)
855 evas_object_textblock_style_set(ep->object, stl->style); 531 evas_object_textblock_style_set(ep->object, stl->style);
856 } 532 // FIXME: need to account for editing
857 533 if (ep->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
858 if (ep->part->type == EDJE_PART_TYPE_TEXT) 534 {
859 { 535 // do nothing - should be done elsewhere
860 FLOAT_T ellip = params->type.text->ellipsis; 536 }
861 efl_text_font_set(ep->object, font, size); 537 else
862 efl_text_ellipsis_set(ep->object, (ellip == -1.0) ? -1.0 : 1.0 - ellip); 538 {
863 _edje_textblock_colors_set(ed, ep, params, EINA_TRUE); 539 evas_object_textblock_text_markup_set(ep->object, text);
864 } 540 }
865 541
866 // FIXME: need to account for editing 542 if ((ed->file->efl_version.major >= 1) && (ed->file->efl_version.minor >= 19))
867 if (ep->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE) 543 {
868 { 544 _edje_part_recalc_single_textblock_min_max_calc(ep,
869 // do nothing - should be done elsewhere 545 chosen_desc,
870 } 546 params,
871 else 547 minw, minh,
872 { 548 maxw, maxh);
873 evas_object_textblock_text_markup_set(ep->object, text); 549 }
550 else
551 {
552 _edje_part_recalc_single_textblock_min_max_calc_legacy(ep,
553 chosen_desc,
554 params,
555 minw, minh,
556 maxw, maxh);
557 }
874 } 558 }
875 559
876 if ((ed->file->efl_version.major >= 1) && (ed->file->efl_version.minor >= 19)) 560 evas_object_textblock_valign_set(ep->object, TO_DOUBLE(chosen_desc->text.align.y));
877 {
878 _edje_part_recalc_single_textblock_min_max_calc(ep,
879 chosen_desc,
880 params,
881 minw, minh,
882 maxw, maxh);
883 }
884 else
885 {
886 _edje_part_recalc_single_textblock_min_max_calc_legacy(ep,
887 chosen_desc,
888 params,
889 minw, minh,
890 maxw, maxh);
891 }
892 } 561 }
893} 562}
894 563
@@ -897,11 +566,15 @@ _edje_textblock_recalc_apply(Edje *ed, Edje_Real_Part *ep,
897 Edje_Calc_Params *params, 566 Edje_Calc_Params *params,
898 Edje_Part_Description_Text *chosen_desc) 567 Edje_Part_Description_Text *chosen_desc)
899{ 568{
569 /* FIXME: this is just an hack. */
900 FLOAT_T sc; 570 FLOAT_T sc;
901 571
572#if 0
573 _get_text(ep);
574#endif
575
902 sc = DIV(ed->scale, ed->file->base_scale); 576 sc = DIV(ed->scale, ed->file->base_scale);
903 if (EQ(sc, ZERO)) sc = DIV(_edje_scale, ed->file->base_scale); 577 if (EQ(sc, ZERO)) sc = DIV(_edje_scale, ed->file->base_scale);
904 _edje_textblock_colors_set(ed, ep, params, EINA_FALSE);
905 if (chosen_desc->text.fit_x || chosen_desc->text.fit_y) 578 if (chosen_desc->text.fit_x || chosen_desc->text.fit_y)
906 { 579 {
907 _edje_part_recalc_single_textblock(sc, ed, ep, chosen_desc, params, 580 _edje_part_recalc_single_textblock(sc, ed, ep, chosen_desc, params,
diff --git a/src/lib/edje/edje_util.c b/src/lib/edje/edje_util.c
index deea92545b..da5c3cb069 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,
2078 return desc->text.text.str; 2078 return desc->text.text.str;
2079 } 2079 }
2080 } 2080 }
2081 else 2081 if (rp->part->type == EDJE_PART_TYPE_TEXTBLOCK)
2082 { 2082 {
2083 const char *entry; 2083 const char *entry;
2084 if (legacy) 2084 if (legacy)
@@ -3496,7 +3496,7 @@ again:
3496 //width 3496 //width
3497 if (!ep->chosen_description->fixed.w) 3497 if (!ep->chosen_description->fixed.w)
3498 { 3498 {
3499 if ((legacy_calc) && PART_IS_TEXT(ed, ep)) 3499 if ((legacy_calc) && (ep->part->type == EDJE_PART_TYPE_TEXTBLOCK))
3500 { 3500 {
3501 //We care textblock width size specially. 3501 //We care textblock width size specially.
3502 Evas_Coord tb_mw; 3502 Evas_Coord tb_mw;
@@ -3524,8 +3524,9 @@ again:
3524 { 3524 {
3525 if (legacy_calc) 3525 if (legacy_calc)
3526 { 3526 {
3527 if (!PART_IS_TEXT(ed, ep) || 3527 if ((ep->part->type != EDJE_PART_TYPE_TEXTBLOCK) ||
3528 ((Edje_Part_Description_Text *)ep->chosen_description)->text.min_x || !skip_h) 3528 ((Edje_Part_Description_Text *)ep->chosen_description)->text.min_x ||
3529 !skip_h)
3529 { 3530 {
3530 if (over_h > max_over_h) 3531 if (over_h > max_over_h)
3531 { 3532 {
@@ -3535,7 +3536,7 @@ again:
3535 } 3536 }
3536 } 3537 }
3537 3538
3538 if (PART_IS_TEXT(ed, ep)) 3539 if (ep->part->type == EDJE_PART_TYPE_TEXTBLOCK)
3539 has_fixed_tb = EINA_FALSE; 3540 has_fixed_tb = EINA_FALSE;
3540 } 3541 }
3541 else if (over_h > max_over_h) 3542 else if (over_h > max_over_h)