popup: add outside_pad for portrait mode 91/161891/5
authorJinYong Park <j4939.park@samsung.com>
Tue, 28 Nov 2017 05:55:27 +0000 (14:55 +0900)
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>
Wed, 3 Jan 2018 07:17:31 +0000 (07:17 +0000)
@tizen_fix

original patch : https://review.tizen.org/gerrit/#/c/76462/

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

index 358f01c..5a236cb 100644 (file)
@@ -197,6 +197,10 @@ _scroller_size_calc(Evas_Object *obj)
    Evas_Coord h_title = 0;
    Evas_Coord h_action_area = 0;
    const char *action_area_height;
+   /* TIZEN_ONLY(20160624): add outside padding */
+   const char *outside_pad;
+   Evas_Coord h_pad = 0;
+   /* END */
    /* TIZEN_ONLY(20170202): fix popup max height */
    Evas_Coord y, wy;
    /* END */
@@ -234,6 +238,15 @@ _scroller_size_calc(Evas_Object *obj)
                   / edje_object_base_scale_get(elm_layout_edje_get(sd->action_area));
      }
 
+   /* TIZEN_ONLY(20160624): add out side padding */
+   outside_pad = edje_object_data_get(elm_layout_edje_get(sd->main_layout), "popup_outside_pad");
+
+   if (outside_pad) h_pad = (int)(atoi(outside_pad)
+                            * elm_config_scale_get()
+                            * elm_object_scale_get(obj)
+                            / edje_object_base_scale_get(elm_layout_edje_get(sd->main_layout)));
+   /* END */
+
    /* TIZEN_ONLY(20160623):Apply popup compress mode UX
    sd->max_sc_h = h - (h_title + h_action_area);
    */
@@ -241,7 +254,7 @@ _scroller_size_calc(Evas_Object *obj)
        ((wd->orient_mode == 90) || (wd->orient_mode == 270)))
       sd->max_sc_h = h - h_action_area;
    else
-      sd->max_sc_h = h - (h_title + h_action_area);
+      sd->max_sc_h = h - (h_title + h_action_area + h_pad);
    /* END */
 }