From: JinYong Park Date: Mon, 27 Nov 2017 04:03:16 +0000 (+0900) Subject: popup: fix popup size problem in landscape display mode X-Git-Tag: submit/sandbox/upgrade/efl120/20180319.053334~629 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d1b941b2ea00bf3c8a37d4041bf2c3357ef345ee;p=platform%2Fupstream%2Fefl.git popup: fix popup size problem in landscape display mode origin patch : https://review.tizen.org/gerrit/#/c/64773/ Change-Id: I1fff057746d06d5a239a5d21cc5518ff75e4616e Signed-off-by: JinYong Park --- diff --git a/src/lib/elementary/elc_popup.c b/src/lib/elementary/elc_popup.c index 5a236cb..8032ae3 100644 --- a/src/lib/elementary/elc_popup.c +++ b/src/lib/elementary/elc_popup.c @@ -727,6 +727,11 @@ _elm_popup_elm_layout_sizing_eval(Eo *obj, Elm_Popup_Data *sd) { double horizontal, vertical; Evas_Coord w, h; + /* TIZEN_ONLY(20160405): fix popup size problem in landscape mode */ + int rotation = -1; + int w_content_area = 9999; + const char *str; + /* END */ edje_object_message_signal_process(elm_layout_edje_get(sd->content_area)); @@ -738,10 +743,25 @@ _elm_popup_elm_layout_sizing_eval(Eo *obj, Elm_Popup_Data *sd) h = sd->max_sc_h; /* END */ + /* TIZEN_ONLY(20160405): fix popup size problem in landscape mode */ + str = edje_object_data_get(elm_layout_edje_get(sd->content_area), "content_area_wdith"); + if (str) w_content_area = (int)(atoi(str) + * elm_config_scale_get() + * elm_object_scale_get(obj) + / edje_object_base_scale_get(elm_layout_edje_get(sd->content_area))); + /* END */ + if (EINA_DBL_EQ(horizontal, ELM_NOTIFY_ALIGN_FILL)) minw = w; if (EINA_DBL_EQ(vertical, ELM_NOTIFY_ALIGN_FILL)) minh = h; + + /* TIZEN_ONLY(20160405): fix popup size problem in landscape mode */ + rotation = elm_win_rotation_get(elm_widget_top_get(elm_widget_parent_get(sd->notify))); + if ((rotation == 90 || rotation == 270) && (horizontal == ELM_NOTIFY_ALIGN_FILL)) + minw = w_content_area; + /* END */ + edje_object_size_min_restricted_calc(elm_layout_edje_get(sd->content_area), &minw, &minh, minw, minh);