summaryrefslogtreecommitdiff
path: root/legacy/edje/src/lib/edje_text.c
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2012-12-11 10:50:51 +0000
committerCedric BAIL <cedric.bail@free.fr>2012-12-11 10:50:51 +0000
commitc0ac1daafd58ae4939672cf1fe4a8c2914d1af9f (patch)
tree06263145c32bb5fdfe4ef8b8f11c12f815583d99 /legacy/edje/src/lib/edje_text.c
parent8d7f3111c8c9aa103c37444d7f5e51f9a7e7cbfb (diff)
edje: use more eo_do.
SVN revision: 80643
Diffstat (limited to 'legacy/edje/src/lib/edje_text.c')
-rw-r--r--legacy/edje/src/lib/edje_text.c79
1 files changed, 40 insertions, 39 deletions
diff --git a/legacy/edje/src/lib/edje_text.c b/legacy/edje/src/lib/edje_text.c
index 700154c..0b26580 100644
--- a/legacy/edje/src/lib/edje_text.c
+++ b/legacy/edje/src/lib/edje_text.c
@@ -132,11 +132,12 @@ _edje_text_fit_x(Edje *ed, Edje_Real_Part *ep,
132 if (sw <= 1) return ""; 132 if (sw <= 1) return "";
133 133
134 if (ep->part->scale) evas_object_scale_set(ep->object, TO_DOUBLE(sc)); 134 if (ep->part->scale) evas_object_scale_set(ep->object, TO_DOUBLE(sc));
135 evas_object_text_font_set(ep->object, font, size);
136 evas_object_text_text_set(ep->object, text);
137 135
136 eo_do(ep->object,
137 evas_obj_text_font_set(font, size),
138 evas_obj_text_text_set(text),
139 evas_obj_text_style_pad_get(&l, &r, NULL, NULL));
138 part_get_geometry(ep, &tw, &th); 140 part_get_geometry(ep, &tw, &th);
139 evas_object_text_style_pad_get(ep->object, &l, &r, NULL, NULL);
140 141
141 p = ((sw - tw) * params->type.text.elipsis); 142 p = ((sw - tw) * params->type.text.elipsis);
142 143
@@ -446,8 +447,9 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
446 else evas_object_text_font_source_set(ep->object, NULL); 447 else evas_object_text_font_source_set(ep->object, NULL);
447 448
448 if (ep->part->scale) evas_object_scale_set(ep->object, TO_DOUBLE(sc)); 449 if (ep->part->scale) evas_object_scale_set(ep->object, TO_DOUBLE(sc));
449 evas_object_text_font_set(ep->object, font, size); 450 eo_do(ep->object,
450 evas_object_text_text_set(ep->object, text); 451 evas_obj_text_font_set(font, size),
452 evas_obj_text_text_set(text));
451 part_get_geometry(ep, &tw, &th); 453 part_get_geometry(ep, &tw, &th);
452 /* Find the wanted font size */ 454 /* Find the wanted font size */
453 if ((tw != sw) && (size > 0) && (tw != 0)) 455 if ((tw != sw) && (size > 0) && (tw != 0))
@@ -478,8 +480,9 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
478 else evas_object_text_font_source_set(ep->object, NULL); 480 else evas_object_text_font_source_set(ep->object, NULL);
479 481
480 if (ep->part->scale) evas_object_scale_set(ep->object, TO_DOUBLE(sc)); 482 if (ep->part->scale) evas_object_scale_set(ep->object, TO_DOUBLE(sc));
481 evas_object_text_font_set(ep->object, font, size); 483 eo_do(ep->object,
482 evas_object_text_text_set(ep->object, text); 484 evas_obj_text_font_set(font, size),
485 evas_obj_text_text_set(text));
483 part_get_geometry(ep, &tw, &th); 486 part_get_geometry(ep, &tw, &th);
484 487
485 /* only grow the font size if we didn't already reach the max size 488 /* only grow the font size if we didn't already reach the max size
@@ -584,8 +587,9 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
584 else evas_object_text_font_source_set(ep->object, NULL); 587 else evas_object_text_font_source_set(ep->object, NULL);
585 588
586 if (ep->part->scale) evas_object_scale_set(ep->object, TO_DOUBLE(sc)); 589 if (ep->part->scale) evas_object_scale_set(ep->object, TO_DOUBLE(sc));
587 evas_object_text_font_set(ep->object, font, size); 590 eo_do(ep->object,
588 evas_object_text_text_set(ep->object, text); 591 evas_obj_text_font_set(font, size),
592 evas_obj_text_text_set(text));
589 part_get_geometry(ep, &tw, &th); 593 part_get_geometry(ep, &tw, &th);
590 /* Handle alignment */ 594 /* Handle alignment */
591 { 595 {
@@ -668,29 +672,27 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
668 break; 672 break;
669 case EDJE_TEXT_EFFECT_OUTLINE_SHADOW: 673 case EDJE_TEXT_EFFECT_OUTLINE_SHADOW:
670 style = EVAS_TEXT_STYLE_OUTLINE_SHADOW; 674 style = EVAS_TEXT_STYLE_OUTLINE_SHADOW;
671 evas_object_text_outline_color_set(ep->object, 675 eo_do(ep->object,
672 (params->type.text.color2.r * params->type.text.color2.a) / 255, 676 evas_obj_text_outline_color_set((params->type.text.color2.r * params->type.text.color2.a) / 255,
673 (params->type.text.color2.g * params->type.text.color2.a) / 255, 677 (params->type.text.color2.g * params->type.text.color2.a) / 255,
674 (params->type.text.color2.b * params->type.text.color2.a) / 255, 678 (params->type.text.color2.b * params->type.text.color2.a) / 255,
675 params->type.text.color2.a); 679 params->type.text.color2.a),
676 evas_object_text_shadow_color_set(ep->object, 680 evas_obj_text_shadow_color_set((params->type.text.color3.r * params->type.text.color3.a) / 255,
677 (params->type.text.color3.r * params->type.text.color3.a) / 255, 681 (params->type.text.color3.g * params->type.text.color3.a) / 255,
678 (params->type.text.color3.g * params->type.text.color3.a) / 255, 682 (params->type.text.color3.b * params->type.text.color3.a) / 255,
679 (params->type.text.color3.b * params->type.text.color3.a) / 255, 683 params->type.text.color3.a));
680 params->type.text.color3.a);
681 break; 684 break;
682 case EDJE_TEXT_EFFECT_OUTLINE_SOFT_SHADOW: 685 case EDJE_TEXT_EFFECT_OUTLINE_SOFT_SHADOW:
683 style = EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW; 686 style = EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW;
684 evas_object_text_outline_color_set(ep->object, 687 eo_do(ep->object,
685 (params->type.text.color2.r * params->type.text.color2.a) / 255, 688 evas_obj_text_outline_color_set((params->type.text.color2.r * params->type.text.color2.a) / 255,
686 (params->type.text.color2.g * params->type.text.color2.a) / 255, 689 (params->type.text.color2.g * params->type.text.color2.a) / 255,
687 (params->type.text.color2.b * params->type.text.color2.a) / 255, 690 (params->type.text.color2.b * params->type.text.color2.a) / 255,
688 params->type.text.color2.a); 691 params->type.text.color2.a),
689 evas_object_text_shadow_color_set(ep->object, 692 evas_obj_text_shadow_color_set((params->type.text.color3.r * params->type.text.color3.a) / 255,
690 (params->type.text.color3.r * params->type.text.color3.a) / 255, 693 (params->type.text.color3.g * params->type.text.color3.a) / 255,
691 (params->type.text.color3.g * params->type.text.color3.a) / 255, 694 (params->type.text.color3.b * params->type.text.color3.a) / 255,
692 (params->type.text.color3.b * params->type.text.color3.a) / 255, 695 params->type.text.color3.a));
693 params->type.text.color3.a);
694 break; 696 break;
695 case EDJE_TEXT_EFFECT_FAR_SHADOW: 697 case EDJE_TEXT_EFFECT_FAR_SHADOW:
696 style = EVAS_TEXT_STYLE_FAR_SHADOW; 698 style = EVAS_TEXT_STYLE_FAR_SHADOW;
@@ -710,16 +712,15 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
710 break; 712 break;
711 case EDJE_TEXT_EFFECT_GLOW: 713 case EDJE_TEXT_EFFECT_GLOW:
712 style = EVAS_TEXT_STYLE_GLOW; 714 style = EVAS_TEXT_STYLE_GLOW;
713 evas_object_text_glow_color_set(ep->object, 715 eo_do(ep->object,
714 (params->type.text.color2.r * params->type.text.color2.a) / 255, 716 evas_obj_text_glow_color_set((params->type.text.color2.r * params->type.text.color2.a) / 255,
715 (params->type.text.color2.g * params->type.text.color2.a) / 255, 717 (params->type.text.color2.g * params->type.text.color2.a) / 255,
716 (params->type.text.color2.b * params->type.text.color2.a) / 255, 718 (params->type.text.color2.b * params->type.text.color2.a) / 255,
717 params->type.text.color2.a); 719 params->type.text.color2.a),
718 evas_object_text_glow2_color_set(ep->object, 720 evas_obj_text_glow2_color_set((params->type.text.color3.r * params->type.text.color3.a) / 255,
719 (params->type.text.color3.r * params->type.text.color3.a) / 255, 721 (params->type.text.color3.g * params->type.text.color3.a) / 255,
720 (params->type.text.color3.g * params->type.text.color3.a) / 255, 722 (params->type.text.color3.b * params->type.text.color3.a) / 255,
721 (params->type.text.color3.b * params->type.text.color3.a) / 255, 723 params->type.text.color3.a));
722 params->type.text.color3.a);
723 break; 724 break;
724 default: 725 default:
725 style = EVAS_TEXT_STYLE_PLAIN; 726 style = EVAS_TEXT_STYLE_PLAIN;