summaryrefslogtreecommitdiff
path: root/legacy
diff options
context:
space:
mode:
authorPeter Wehrfritz <peter.wehrfritz@web.de>2007-07-08 17:52:39 +0000
committerPeter Wehrfritz <peter.wehrfritz@web.de>2007-07-08 17:52:39 +0000
commit6e37525b54e71242f82e10cd4855de8707d5849b (patch)
treed304067bbd49f7e74bb8d195c46a2b7cc52fe35c /legacy
parent4a9f47a386580c585c35b4cf83c2a10d988a8877 (diff)
use a lookup table
SVN revision: 30673
Diffstat (limited to 'legacy')
-rw-r--r--legacy/edje/src/lib/edje_calc.c38
1 files changed, 17 insertions, 21 deletions
diff --git a/legacy/edje/src/lib/edje_calc.c b/legacy/edje/src/lib/edje_calc.c
index 98fedff781..8682f2ec48 100644
--- a/legacy/edje/src/lib/edje_calc.c
+++ b/legacy/edje/src/lib/edje_calc.c
@@ -718,29 +718,25 @@ _edje_part_recalc_single(Edje *ed,
718 { 718 {
719 int mw, mh; 719 int mw, mh;
720 Evas_Text_Style_Type style; 720 Evas_Text_Style_Type style;
721 const Evas_Text_Style_Type styles[] = {
722 EVAS_TEXT_STYLE_PLAIN,
723 EVAS_TEXT_STYLE_PLAIN,
724 EVAS_TEXT_STYLE_OUTLINE,
725 EVAS_TEXT_STYLE_SOFT_OUTLINE,
726 EVAS_TEXT_STYLE_SHADOW,
727 EVAS_TEXT_STYLE_SOFT_SHADOW,
728 EVAS_TEXT_STYLE_OUTLINE_SHADOW,
729 EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW,
730 EVAS_TEXT_STYLE_FAR_SHADOW,
731 EVAS_TEXT_STYLE_FAR_SOFT_SHADOW,
732 EVAS_TEXT_STYLE_GLOW
733 };
721 734
722 style = EVAS_TEXT_STYLE_PLAIN; 735 if (ep->part->effect < EDJE_TEXT_EFFECT_LAST)
723 if ((ep->part->effect == EDJE_TEXT_EFFECT_NONE) || 736 style = styles[ep->part->effect];
724 (ep->part->effect == EDJE_TEXT_EFFECT_PLAIN)) 737 else
725 style = EVAS_TEXT_STYLE_PLAIN; 738 style = EVAS_TEXT_STYLE_PLAIN;
726 else if (ep->part->effect == EDJE_TEXT_EFFECT_OUTLINE) 739
727 style = EVAS_TEXT_STYLE_OUTLINE;
728 else if (ep->part->effect == EDJE_TEXT_EFFECT_SOFT_OUTLINE)
729 style = EVAS_TEXT_STYLE_SOFT_OUTLINE;
730 else if (ep->part->effect == EDJE_TEXT_EFFECT_SHADOW)
731 style = EVAS_TEXT_STYLE_SHADOW;
732 else if (ep->part->effect == EDJE_TEXT_EFFECT_SOFT_SHADOW)
733 style = EVAS_TEXT_STYLE_SOFT_SHADOW;
734 else if (ep->part->effect == EDJE_TEXT_EFFECT_OUTLINE_SHADOW)
735 style = EVAS_TEXT_STYLE_OUTLINE_SHADOW;
736 else if (ep->part->effect == EDJE_TEXT_EFFECT_OUTLINE_SOFT_SHADOW)
737 style = EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW;
738 else if (ep->part->effect == EDJE_TEXT_EFFECT_FAR_SHADOW)
739 style = EVAS_TEXT_STYLE_FAR_SHADOW;
740 else if (ep->part->effect == EDJE_TEXT_EFFECT_FAR_SOFT_SHADOW)
741 style = EVAS_TEXT_STYLE_FAR_SOFT_SHADOW;
742 else if (ep->part->effect == EDJE_TEXT_EFFECT_GLOW)
743 style = EVAS_TEXT_STYLE_GLOW;
744 evas_object_text_style_set(ep->object, style); 740 evas_object_text_style_set(ep->object, style);
745 evas_object_text_text_set(ep->object, text); 741 evas_object_text_text_set(ep->object, text);
746 evas_object_geometry_get(ep->object, NULL, NULL, &tw, &th); 742 evas_object_geometry_get(ep->object, NULL, NULL, &tw, &th);