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
This commit is contained in:
woochanlee 2014-10-11 00:17:21 +09:00 committed by ChunEon Park
parent f5508d8624
commit 2f7460acfb
2 changed files with 3 additions and 15 deletions

View File

@ -158,3 +158,4 @@ Savio Sena <savio@expertisesolutions.com.br>
Jae Yong Hwang <j_yong.hwang@samsung.com> Jae Yong Hwang <j_yong.hwang@samsung.com>
Kabeer Khan <kabeer.khan@samsung.com> Kabeer Khan <kabeer.khan@samsung.com>
yinsc <shouchen.yin@samsung.com> yinsc <shouchen.yin@samsung.com>
Woochan Lee <wc0917.lee@samsung.com>

View File

@ -28,7 +28,6 @@ _elm_bg_elm_layout_sizing_eval(Eo *obj, Elm_Bg_Data *sd)
Evas_Coord iw = 0, ih = 0, mw = -1, mh = -1; Evas_Coord iw = 0, ih = 0, mw = -1, mh = -1;
Evas_Coord bx = 0, by = 0, bw = 0, bh = 0; Evas_Coord bx = 0, by = 0, bw = 0, bh = 0;
Evas_Coord fx = 0, fy = 0, fw = 0, fh = 0; Evas_Coord fx = 0, fy = 0, fw = 0, fh = 0;
Evas_Coord nx = 0, ny = 0, nw = 0, nh = 0;
const char *p; const char *p;
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
@ -44,21 +43,11 @@ _elm_bg_elm_layout_sizing_eval(Eo *obj, Elm_Bg_Data *sd)
evas_object_geometry_get evas_object_geometry_get
(wd->resize_obj, &bx, &by, &bw, &bh); (wd->resize_obj, &bx, &by, &bw, &bh);
/* set some defaults */
nx = bx;
ny = by;
nw = bw;
nh = bh;
switch (sd->option) switch (sd->option)
{ {
case ELM_BG_OPTION_CENTER: case ELM_BG_OPTION_CENTER:
fw = nw = iw; fw = mw = iw;
fh = nh = ih; fh = mh = ih;
nx = ((bw - fw) / 2);
ny = ((bh - fh) / 2);
mw = iw;
mh = ih;
break; break;
case ELM_BG_OPTION_SCALE: case ELM_BG_OPTION_SCALE:
@ -85,8 +74,6 @@ _elm_bg_elm_layout_sizing_eval(Eo *obj, Elm_Bg_Data *sd)
break; break;
} }
evas_object_move(sd->img, nx, ny);
evas_object_resize(sd->img, nw, nh);
evas_object_image_fill_set(sd->img, fx, fy, fw, fh); evas_object_image_fill_set(sd->img, fx, fy, fw, fh);
evas_object_size_hint_min_set(sd->img, mw, mh); evas_object_size_hint_min_set(sd->img, mw, mh);