summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChunEon Park <hermet@hermet.pe.kr>2014-08-14 13:15:22 +0900
committerChunEon Park <hermet@hermet.pe.kr>2014-08-14 13:15:22 +0900
commite8c3905e2c9b8a8c3f9d49f68538cb873c869100 (patch)
tree58a27dadebbd9428c887914f1b1f5c88299c24e1
parentd08dd13d3d344ba1d1c3ee458618497585b6f25c (diff)
parentb4d013d2ec4641bdc2189e35264904632ff7e45a (diff)
Merge branch 'master' of ssh://git.enlightenment.org/core/efl
-rw-r--r--src/lib/evas/canvas/evas_object_grid.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/lib/evas/canvas/evas_object_grid.c b/src/lib/evas/canvas/evas_object_grid.c
index a866c42780..a0debc738a 100644
--- a/src/lib/evas/canvas/evas_object_grid.c
+++ b/src/lib/evas/canvas/evas_object_grid.c
@@ -208,7 +208,7 @@ _evas_object_grid_smart_calculate(Evas_Object *o)
208{ 208{
209 Eina_List *l; 209 Eina_List *l;
210 Evas_Object_Grid_Option *opt; 210 Evas_Object_Grid_Option *opt;
211 Evas_Coord x, y, w, h, vw, vh, t; 211 Evas_Coord x, y, w, h, vw, vh;
212 Eina_Bool mirror; 212 Eina_Bool mirror;
213 213
214 EVAS_OBJECT_GRID_DATA_GET_OR_RETURN(o, priv); 214 EVAS_OBJECT_GRID_DATA_GET_OR_RETURN(o, priv);
@@ -222,15 +222,18 @@ _evas_object_grid_smart_calculate(Evas_Object *o)
222 { 222 {
223 Evas_Coord x1, y1, x2, y2; 223 Evas_Coord x1, y1, x2, y2;
224 224
225 x1 = x + ((w * opt->x) / vw); 225 if (!mirror)
226 y1 = y + ((h * opt->y) / vh); 226 {
227 x2 = x + ((w * (opt->x + opt->w)) / vw); 227 x1 = x + ((w * opt->x) / vw);
228 y2 = y + ((h * (opt->y + opt->h)) / vh); 228 x2 = x + ((w * (opt->x + opt->w)) / vw);
229 if (mirror) 229 }
230 else
230 { 231 {
231 t = x1; x1 = x2; x2 = t; 232 x1 = x + ((w * (vw - (opt->x + opt->w))) / vw);
232 t = y1; y1 = y2; y2 = t; 233 x2 = x + ((w * (vw - opt->x)) / vw);
233 } 234 }
235 y1 = y + ((h * opt->y) / vh);
236 y2 = y + ((h * (opt->y + opt->h)) / vh);
234 evas_object_move(opt->obj, x1, y1); 237 evas_object_move(opt->obj, x1, y1);
235 evas_object_resize(opt->obj, x2 - x1, y2 - y1); 238 evas_object_resize(opt->obj, x2 - x1, y2 - y1);
236 } 239 }