summaryrefslogtreecommitdiff
path: root/legacy
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2012-08-27 08:59:11 +0000
committerTom Hacohen <tom@stosb.com>2012-08-27 08:59:11 +0000
commitb0a19e7d4ab6832fae97b60c0c50cf5f875029a9 (patch)
tree6d54a13cfe2a6d0037559bb7eccbf94d5536737d /legacy
parentdd7d35b1f76cb2ef5a5e174a11b718123191fef7 (diff)
Edje textblock: Fixed an issue with textblock fit.
Thanks to Brian Wang for reporting this. SVN revision: 75730
Diffstat (limited to 'legacy')
-rw-r--r--legacy/edje/ChangeLog4
-rw-r--r--legacy/edje/src/lib/edje_calc.c20
-rw-r--r--legacy/edje/src/lib/edje_entry.c2
3 files changed, 25 insertions, 1 deletions
diff --git a/legacy/edje/ChangeLog b/legacy/edje/ChangeLog
index 24e9617696..818cd33a7e 100644
--- a/legacy/edje/ChangeLog
+++ b/legacy/edje/ChangeLog
@@ -565,3 +565,7 @@
565 565
566 * Properly destroy color_class and text_class on an Edje_Object. 566 * Properly destroy color_class and text_class on an Edje_Object.
567 567
5682012-08-27 Tom Hacohen (TAsn)
569
570 * Textblock: Fixed issue with textblock fit not sizing correctly. This
571 fix is not perfect.
diff --git a/legacy/edje/src/lib/edje_calc.c b/legacy/edje/src/lib/edje_calc.c
index ccf281c24f..84f8090dad 100644
--- a/legacy/edje/src/lib/edje_calc.c
+++ b/legacy/edje/src/lib/edje_calc.c
@@ -1294,6 +1294,22 @@ _edje_part_recalc_single_textblock(FLOAT_T sc,
1294} 1294}
1295 1295
1296static void 1296static void
1297_edje_textblock_recalc_apply(Edje *ed, Edje_Real_Part *ep,
1298 Edje_Calc_Params *params,
1299 Edje_Part_Description_Text *chosen_desc)
1300{
1301 /* FIXME: this is just an hack. */
1302 FLOAT_T sc;
1303 sc = ed->scale;
1304 if (sc == ZERO) sc = _edje_scale;
1305 if (chosen_desc->text.fit_x || chosen_desc->text.fit_y)
1306 {
1307 _edje_part_recalc_single_textblock(sc, ed, ep, chosen_desc, params,
1308 NULL, NULL, NULL, NULL);
1309 }
1310}
1311
1312static void
1297_edje_part_recalc_single_text(FLOAT_T sc __UNUSED__, 1313_edje_part_recalc_single_text(FLOAT_T sc __UNUSED__,
1298 Edje *ed, 1314 Edje *ed,
1299 Edje_Real_Part *ep, 1315 Edje_Real_Part *ep,
@@ -2941,11 +2957,13 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
2941 case EDJE_PART_TYPE_TABLE: 2957 case EDJE_PART_TYPE_TABLE:
2942 _edje_table_recalc_apply(ed, ep, pf, (Edje_Part_Description_Table*) chosen_desc); 2958 _edje_table_recalc_apply(ed, ep, pf, (Edje_Part_Description_Table*) chosen_desc);
2943 break; 2959 break;
2960 case EDJE_PART_TYPE_TEXTBLOCK:
2961 _edje_textblock_recalc_apply(ed, ep, pf, (Edje_Part_Description_Text*) chosen_desc);
2962 break;
2944 case EDJE_PART_TYPE_EXTERNAL: 2963 case EDJE_PART_TYPE_EXTERNAL:
2945 case EDJE_PART_TYPE_RECTANGLE: 2964 case EDJE_PART_TYPE_RECTANGLE:
2946 case EDJE_PART_TYPE_SWALLOW: 2965 case EDJE_PART_TYPE_SWALLOW:
2947 case EDJE_PART_TYPE_GROUP: 2966 case EDJE_PART_TYPE_GROUP:
2948 case EDJE_PART_TYPE_TEXTBLOCK:
2949 /* Nothing special to do for this type of object. */ 2967 /* Nothing special to do for this type of object. */
2950 break; 2968 break;
2951 case EDJE_PART_TYPE_GRADIENT: 2969 case EDJE_PART_TYPE_GRADIENT:
diff --git a/legacy/edje/src/lib/edje_entry.c b/legacy/edje/src/lib/edje_entry.c
index 306838a918..3307e34acf 100644
--- a/legacy/edje/src/lib/edje_entry.c
+++ b/legacy/edje/src/lib/edje_entry.c
@@ -2454,6 +2454,8 @@ _edje_entry_text_markup_set(Edje_Real_Part *rp, const char *text)
2454 _anchors_get(en->cursor, rp->object, en); 2454 _anchors_get(en->cursor, rp->object, en);
2455 _edje_emit(rp->edje, "entry,changed", rp->part->name); 2455 _edje_emit(rp->edje, "entry,changed", rp->part->name);
2456 _edje_entry_imf_cursor_info_set(en); 2456 _edje_entry_imf_cursor_info_set(en);
2457
2458 _edje_entry_real_part_configure(rp);
2457#if 0 2459#if 0
2458 /* Don't emit cursor changed cause it didn't. It's just init to 0. */ 2460 /* Don't emit cursor changed cause it didn't. It's just init to 0. */
2459 _edje_emit(rp->edje, "cursor,changed", rp->part->name); 2461 _edje_emit(rp->edje, "cursor,changed", rp->part->name);