elm_panel: use widget data for getting geometry 84/130184/2
authorJaeun Choi <jaeun12.choi@samsung.com>
Fri, 19 May 2017 08:59:44 +0000 (17:59 +0900)
committerJaeun Choi <jaeun12.choi@samsung.com>
Tue, 23 May 2017 04:25:06 +0000 (04:25 +0000)
_elm_panel_evas_object_smart_resize() ends up calling
_elm_panel_elm_layout_sizing_eval() to adjust the layout
according to the updated width and height.
however, evas_object_geometry_get() doesn't return the updated values.
in fact, it is not necessary to call any API since the values are
stored as widget data in _elm_widget_evas_object_smart_resize().

Change-Id: I68467ec07700ee4dea99d36ee10c433608d5f555

src/lib/elm_panel.c

index cf0c20fc344565ed29409a2c57abacbec579b247..4142d1c66a8e3e91d1dbcfac2460fca8743736d1 100644 (file)
@@ -61,11 +61,8 @@ _elm_panel_elm_layout_sizing_eval(Eo *obj, Elm_Panel_Data *sd)
 
    if (sd->scrollable)
      {
-        int w, h;
-        evas_object_geometry_get(obj, NULL, NULL, &w, &h);
-
-        if (sd->hidden) _drawer_close(obj, w, h, EINA_FALSE);
-        else _drawer_open(obj, w, h, EINA_FALSE);
+        if (sd->hidden) _drawer_close(obj, wd->w, wd->h, EINA_FALSE);
+        else _drawer_open(obj, wd->w, wd->h, EINA_FALSE);
      }
 
    evas_object_smart_calculate(sd->bx);