elm_toolbar: remove code duplication
authorJee-Yong Um <jc9.um@samsung.com>
Wed, 11 Feb 2015 07:49:24 +0000 (16:49 +0900)
committerDaniel Juyung Seo <seojuyung2@gmail.com>
Wed, 11 Feb 2015 07:49:25 +0000 (16:49 +0900)
Summary:
elm_coords_finger_size_adjust() is called twice.
It might not be intended.

Reviewers: Hermet, Jaehyun, seoz

Reviewed By: seoz

Subscribers: raster, seoz, Hermet

Differential Revision: https://phab.enlightenment.org/D1924

src/lib/elm_toolbar.c

index 650819349fcbac97a8e78ee73c533ebea943e1c3..f3a1f1a89b028cb3b2b1c54c9c37ba9a882f5611 100644 (file)
@@ -1176,7 +1176,7 @@ _item_theme_hook(Evas_Object *obj,
                  double scale,
                  int icon_size)
 {
-   Evas_Coord mw, mh, minw, minh;
+   Evas_Coord mw = -1, mh = -1;
    Evas_Object *view = VIEW(it);
    const char *style;
 
@@ -1258,16 +1258,13 @@ _item_theme_hook(Evas_Object *obj,
           }
      }
 
-   mw = mh = minw = minh = -1;
-   if (!it->separator && !it->object)
-     elm_coords_finger_size_adjust(1, &mw, 1, &mh);
-
    // If the min size is changed by edje signal in edc,
    //the below function should be called before the calculation.
    edje_object_message_signal_process(view);
-   edje_object_size_min_restricted_calc(view, &mw, &mh, mw, mh);
+
    if (!it->separator && !it->object)
      elm_coords_finger_size_adjust(1, &mw, 1, &mh);
+   edje_object_size_min_restricted_calc(view, &mw, &mh, mw, mh);
    evas_object_size_hint_min_set(view, mw, mh);
 }