summaryrefslogtreecommitdiff
path: root/legacy
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2011-04-03 09:14:03 +0000
committerTom Hacohen <tom@stosb.com>2011-04-03 09:14:03 +0000
commitd4e2a42dff14c5c5bd203f37d5dcdaf410de251d (patch)
treeb8e2a85dd561551338ef650f8657961e7627b052 /legacy
parent33eacca8717d716a7e26b36b5d2bbcfe61d0773f (diff)
Evas textblock: Fixed native size calculation.
There was a bug (visible in elementary_test's Entry for example) that made native size calculation of the textblock wrong in some cases. SVN revision: 58289
Diffstat (limited to 'legacy')
-rw-r--r--legacy/evas/src/lib/canvas/evas_object_textblock.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/legacy/evas/src/lib/canvas/evas_object_textblock.c b/legacy/evas/src/lib/canvas/evas_object_textblock.c
index 036e3358a2..f848c0794a 100644
--- a/legacy/evas/src/lib/canvas/evas_object_textblock.c
+++ b/legacy/evas/src/lib/canvas/evas_object_textblock.c
@@ -1803,7 +1803,8 @@ struct _Ctxt
1803 int underline_extend; 1803 int underline_extend;
1804 int have_underline, have_underline2; 1804 int have_underline, have_underline2;
1805 double align, valign; 1805 double align, valign;
1806 Eina_Bool align_auto; 1806 Eina_Bool align_auto : 1;
1807 Eina_Bool calc_only : 1;
1807}; 1808};
1808 1809
1809static void _layout_text_add_logical_item(Ctxt *c, Evas_Object_Textblock_Text_Item *ti, Eina_List *rel); 1810static void _layout_text_add_logical_item(Ctxt *c, Evas_Object_Textblock_Text_Item *ti, Eina_List *rel);
@@ -3295,8 +3296,9 @@ _layout_visualize_par(Ctxt *c)
3295 int adv_line = 0; 3296 int adv_line = 0;
3296 int redo_item = 0; 3297 int redo_item = 0;
3297 it = _ITEM(eina_list_data_get(i)); 3298 it = _ITEM(eina_list_data_get(i));
3298 /* Skip visually deleted items */ 3299 /* Skip visually deleted items - only if it's a real calc.
3299 if (it->visually_deleted) 3300 * In the calc only case we want to take them into account */
3301 if (!c->calc_only && it->visually_deleted)
3300 { 3302 {
3301 i = eina_list_next(i); 3303 i = eina_list_next(i);
3302 continue; 3304 continue;
@@ -3466,7 +3468,7 @@ _layout_visualize_par(Ctxt *c)
3466 * Create the layout from the nodes. 3468 * Create the layout from the nodes.
3467 * 3469 *
3468 * @param obj the evas object - NOT NULL. 3470 * @param obj the evas object - NOT NULL.
3469 * @param calc_only true if should only calc sizes false if should also create the layout.. 3471 * @param calc_only true if should only calc sizes false if should also create the layout.. It assumes native size is being calculated, doesn't support formatted size atm.
3470 * @param w the object's w, -1 means no wrapping (i.e infinite size) 3472 * @param w the object's w, -1 means no wrapping (i.e infinite size)
3471 * @param h the object's h, -1 means inifinte size. 3473 * @param h the object's h, -1 means inifinte size.
3472 * @param w_ret the object's calculated w. 3474 * @param w_ret the object's calculated w.
@@ -3501,7 +3503,7 @@ _layout(const Evas_Object *obj, int calc_only, int w, int h, int *w_ret, int *h_
3501 c->align = 0.0; 3503 c->align = 0.0;
3502 c->align_auto = EINA_TRUE; 3504 c->align_auto = EINA_TRUE;
3503 c->ln = NULL; 3505 c->ln = NULL;
3504 3506 c->calc_only = !!calc_only;
3505 3507
3506 /* Start of logical layout creation */ 3508 /* Start of logical layout creation */
3507 3509