popup: support multiscale problem on TM2 47/135247/3
authorJinYong Park <j4939.park@samsung.com>
Wed, 21 Jun 2017 10:29:42 +0000 (19:29 +0900)
committerJinYong Park <j4939.park@samsung.com>
Thu, 22 Jun 2017 08:00:04 +0000 (17:00 +0900)
Change-Id: I7609002c9f81c2d2f32e79a645934efbecb43b37
Signed-off-by: Jinyong Park <j4939.park@samsung.com>
src/lib/elm_notify.c
src/lib/elm_notify.eo

index 9bde05c..1e646f6 100644 (file)
@@ -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)
 {
index e74295f..8da4edf 100644 (file)
@@ -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;