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)
downloadefl-e8c3905e2c9b8a8c3f9d49f68538cb873c869100.tar.gz
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)
{
Eina_List *l;
Evas_Object_Grid_Option *opt;
- Evas_Coord x, y, w, h, vw, vh, t;
+ Evas_Coord x, y, w, h, vw, vh;
Eina_Bool mirror;
EVAS_OBJECT_GRID_DATA_GET_OR_RETURN(o, priv);
@@ -222,15 +222,18 @@ _evas_object_grid_smart_calculate(Evas_Object *o)
{
Evas_Coord x1, y1, x2, y2;
- x1 = x + ((w * opt->x) / vw);
- y1 = y + ((h * opt->y) / vh);
- x2 = x + ((w * (opt->x + opt->w)) / vw);
- y2 = y + ((h * (opt->y + opt->h)) / vh);
- if (mirror)
+ if (!mirror)
+ {
+ x1 = x + ((w * opt->x) / vw);
+ x2 = x + ((w * (opt->x + opt->w)) / vw);
+ }
+ else
{
- t = x1; x1 = x2; x2 = t;
- t = y1; y1 = y2; y2 = t;
+ x1 = x + ((w * (vw - (opt->x + opt->w))) / vw);
+ x2 = x + ((w * (vw - opt->x)) / vw);
}
+ y1 = y + ((h * opt->y) / vh);
+ y2 = y + ((h * (opt->y + opt->h)) / vh);
evas_object_move(opt->obj, x1, y1);
evas_object_resize(opt->obj, x2 - x1, y2 - y1);
}