summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorwoochanlee <wc0917.lee@samsung.com>2014-10-11 00:17:21 +0900
committerChunEon Park <hermet@hermet.pe.kr>2014-10-11 00:19:27 +0900
commit966fffe0c6e3af0b7e65c3e3d145940f96b1f03a (patch)
treeb424f72b218357aa08dd4c191e508a6c87e318ea /src/lib
parent4d9fdf4ebaf9ba009939a65419222c59ce5c12d0 (diff)
bg: fix the _elm_bg_elm_layout_sizing_eval bug.
Summary: Since the sd->image is swallowed to the edje object, it's position and size will be managed by edje smart object. in the bg side, it doesn't need to care the position and size of the image. @fix Reviewers: Hermet Differential Revision: https://phab.enlightenment.org/D1525
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/elm_bg.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/src/lib/elm_bg.c b/src/lib/elm_bg.c
index 03d264580..b791fe02e 100644
--- a/src/lib/elm_bg.c
+++ b/src/lib/elm_bg.c
@@ -28,7 +28,6 @@ _elm_bg_elm_layout_sizing_eval(Eo *obj, Elm_Bg_Data *sd)
28 Evas_Coord iw = 0, ih = 0, mw = -1, mh = -1; 28 Evas_Coord iw = 0, ih = 0, mw = -1, mh = -1;
29 Evas_Coord bx = 0, by = 0, bw = 0, bh = 0; 29 Evas_Coord bx = 0, by = 0, bw = 0, bh = 0;
30 Evas_Coord fx = 0, fy = 0, fw = 0, fh = 0; 30 Evas_Coord fx = 0, fy = 0, fw = 0, fh = 0;
31 Evas_Coord nx = 0, ny = 0, nw = 0, nh = 0;
32 const char *p; 31 const char *p;
33 32
34 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); 33 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
@@ -44,21 +43,11 @@ _elm_bg_elm_layout_sizing_eval(Eo *obj, Elm_Bg_Data *sd)
44 evas_object_geometry_get 43 evas_object_geometry_get
45 (wd->resize_obj, &bx, &by, &bw, &bh); 44 (wd->resize_obj, &bx, &by, &bw, &bh);
46 45
47 /* set some defaults */
48 nx = bx;
49 ny = by;
50 nw = bw;
51 nh = bh;
52
53 switch (sd->option) 46 switch (sd->option)
54 { 47 {
55 case ELM_BG_OPTION_CENTER: 48 case ELM_BG_OPTION_CENTER:
56 fw = nw = iw; 49 fw = mw = iw;
57 fh = nh = ih; 50 fh = mh = ih;
58 nx = ((bw - fw) / 2);
59 ny = ((bh - fh) / 2);
60 mw = iw;
61 mh = ih;
62 break; 51 break;
63 52
64 case ELM_BG_OPTION_SCALE: 53 case ELM_BG_OPTION_SCALE:
@@ -85,8 +74,6 @@ _elm_bg_elm_layout_sizing_eval(Eo *obj, Elm_Bg_Data *sd)
85 break; 74 break;
86 } 75 }
87 76
88 evas_object_move(sd->img, nx, ny);
89 evas_object_resize(sd->img, nw, nh);
90 evas_object_image_fill_set(sd->img, fx, fy, fw, fh); 77 evas_object_image_fill_set(sd->img, fx, fy, fw, fh);
91 78
92 evas_object_size_hint_min_set(sd->img, mw, mh); 79 evas_object_size_hint_min_set(sd->img, mw, mh);