From: JinYong Park Date: Wed, 21 Jun 2017 10:29:42 +0000 (+0900) Subject: popup: support multiscale problem on TM2 X-Git-Tag: accepted/tizen/unified/20170711.181143~37 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F47%2F135247%2F3;p=platform%2Fupstream%2Felementary.git popup: support multiscale problem on TM2 Change-Id: I7609002c9f81c2d2f32e79a645934efbecb43b37 Signed-off-by: Jinyong Park --- diff --git a/src/lib/elm_notify.c b/src/lib/elm_notify.c index 9bde05c..1e646f6 100644 --- a/src/lib/elm_notify.c +++ b/src/lib/elm_notify.c @@ -21,8 +21,10 @@ _notify_theme_apply(Evas_Object *obj) const char *style = elm_widget_style_get(obj); const char *position; double ax, ay; + Elm_Theme_Apply ret = ELM_THEME_APPLY_FAILED; ELM_NOTIFY_DATA_GET(obj, sd); + ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, ret); ax = sd->horizontal_align; ay = sd->vertical_align; @@ -55,7 +57,16 @@ _notify_theme_apply(Evas_Object *obj) position = "center"; } - return elm_widget_theme_object_set(obj, sd->notify, "notify", position, style); + ret = elm_widget_theme_object_set(obj, sd->notify, "notify", position, style); + + if (wd->orient_mode != -1) + { + char buf[128]; + snprintf(buf, sizeof(buf), "elm,state,orient,%d", wd->orient_mode); + edje_object_signal_emit(sd->notify, buf, "elm"); + } + + return ret; } /** @@ -782,6 +793,19 @@ _elm_notify_align_get(Eo *obj EINA_UNUSED, Elm_Notify_Data *sd, double *horizont *vertical = sd->vertical_align; } +EOLIAN static void +_elm_notify_elm_widget_orientation_set(Eo *obj EINA_UNUSED, Elm_Notify_Data *sd, int orient_mode) +{ + eo_do_super(obj, MY_CLASS, elm_obj_widget_orientation_set(orient_mode)); + + if (orient_mode != -1) + { + char buf[128]; + snprintf(buf, sizeof(buf), "elm,state,orient,%d", orient_mode); + edje_object_signal_emit(sd->notify, buf, "elm"); + } +} + static void _elm_notify_class_constructor(Eo_Class *klass) { diff --git a/src/lib/elm_notify.eo b/src/lib/elm_notify.eo index e74295f..8da4edf 100644 --- a/src/lib/elm_notify.eo +++ b/src/lib/elm_notify.eo @@ -121,6 +121,7 @@ class Elm.Notify (Elm.Container) Elm.Widget.sub_object_del; Elm.Widget.part_text.set; Elm.Widget.part_text.get; + Elm.Widget.orientation.set; Elm.Container.content_get; Elm.Container.content_set; Elm.Container.content_unset;