popup: fix popup's max height 96/112696/1
authorJinYong Park <j4939.park@samsung.com>
Thu, 2 Feb 2017 08:34:20 +0000 (17:34 +0900)
committerJinYong Park <j4939.park@samsung.com>
Thu, 2 Feb 2017 08:36:17 +0000 (17:36 +0900)
If popup's parent is smaller than windown,
popup's max height is smaller than which be intended

Change-Id: I2c53ef3f48ab6c05ab914cfd082b6a694e9f1cc0
Signed-off-by: Jinyong Park <j4939.park@samsung.com>
src/lib/elc_popup.c

index 1b2fd00..062b681 100644 (file)
@@ -201,6 +201,9 @@ _scroller_size_calc(Evas_Object *obj)
    const char *outside_pad;
    Evas_Coord h_pad = 0;
    //
+   /* TIZEN_ONLY(20170202): fix popup max height */
+   Evas_Coord y, wy;
+   /* END */
 
    ELM_POPUP_DATA_GET(obj, sd);
    //TIZEN_ONLY(20160623):Apply popup compress mode UX
@@ -211,7 +214,17 @@ _scroller_size_calc(Evas_Object *obj)
 
    sd->scr_size_recalc = EINA_FALSE;
    sd->max_sc_h = -1;
+   /* TIZEN_ONLY(20170202): fix popup max height
+      adjust notify's height in case height of popup's parent is smaller than window's
+      and there is indicator below the popup
    evas_object_geometry_get(sd->notify, NULL, NULL, NULL, &h);
+   */
+   evas_object_geometry_get(sd->notify, NULL, &y, NULL, &h);
+
+   evas_object_geometry_get(elm_widget_top_get(sd->notify), NULL, &wy, NULL, NULL);
+   h += (y - wy);
+   /* END */
+
    if (sd->title_text || sd->title_icon)
      edje_object_part_geometry_get(elm_layout_edje_get(sd->main_layout),
                                    "elm.bg.title", NULL, NULL, NULL, &h_title);