summaryrefslogtreecommitdiff
path: root/src/lib/edje/edje_text.c
diff options
context:
space:
mode:
authorJaehwan Kim <jae.hwan.kim@samsung.com>2014-07-24 14:50:25 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-07-24 14:50:25 +0900
commit7e5d2606cc8e6aad5e7732235a2d1407ce7a3382 (patch)
tree0fb63cbd65cb75fb0569ecc010ecdebd88c1b0e7 /src/lib/edje/edje_text.c
parent0c3487cd3d619353b4e296d7b657fceea083fee6 (diff)
edje: Add dpi feature.
Summary: This dpi is used to get the scale for each collection. If each collection has a described dpi, it calculates a proper scale based on the dpi and dpi which is described in the collection. @feature Test Plan: If add dpi to collection of edc, the edje will save the value as the dpi of the collection. For example, if the dpi of your device is 100, you just set dpi: 100 in the collection of edc. If the edj is loaded in another device(dpi is 200), it will scaled 2 times. It is possible that the described dpi of application and theme are different. In that case, application and theme have a different scale. It makes the edj that made in different environment works in one device. Reviewers: seoz, zmike, JackDanielZ, Hermet, woohyun, cedric, raster Reviewed By: raster Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D1190
Diffstat (limited to 'src/lib/edje/edje_text.c')
-rw-r--r--src/lib/edje/edje_text.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/edje/edje_text.c b/src/lib/edje/edje_text.c
index 7d53301..c820e0b 100644
--- a/src/lib/edje/edje_text.c
+++ b/src/lib/edje/edje_text.c
@@ -85,8 +85,8 @@ _edje_text_fit_x(Edje *ed, Edje_Real_Part *ep,
85{ 85{
86 FLOAT_T sc; 86 FLOAT_T sc;
87 87
88 sc = ed->scale; 88 sc = DIV(ed->scale, ed->file->base_scale);
89 if (sc == ZERO) sc = _edje_scale; 89 if (sc == ZERO) sc = DIV(_edje_scale, ed->file->base_scale);
90 90
91 *free_text = 0; 91 *free_text = 0;
92 if (sw <= 1) return ""; 92 if (sw <= 1) return "";
@@ -179,8 +179,8 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
179 179
180 if ((ep->type != EDJE_RP_TYPE_TEXT) || 180 if ((ep->type != EDJE_RP_TYPE_TEXT) ||
181 (!ep->typedata.text)) return; 181 (!ep->typedata.text)) return;
182 sc = ed->scale; 182 sc = DIV(ed->scale, ed->file->base_scale);
183 if (sc == 0.0) sc = _edje_scale; 183 if (sc == ZERO) sc = DIV(_edje_scale, ed->file->base_scale);
184 text = edje_string_get(&chosen_desc->text.text); 184 text = edje_string_get(&chosen_desc->text.text);
185 font = _edje_text_class_font_get(ed, chosen_desc, &size, &sfont); 185 font = _edje_text_class_font_get(ed, chosen_desc, &size, &sfont);
186 filter = chosen_desc->text.filter.str; 186 filter = chosen_desc->text.filter.str;