jaehyun pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=0096a8aa3c2daceacd6f53ad917046145a48afab

commit 0096a8aa3c2daceacd6f53ad917046145a48afab
Author: Taehyub Kim <taehyub....@samsung.com>
Date:   Fri Dec 8 16:06:20 2017 +0900

    Efl.Ui.Popup: add popup_size property
    
    Summary: add popup_size property
    
    Test Plan:
    1. run elementary_test -to efl.ui.popup
    2. check the popup
    
    Reviewers: Jaehyun_Cho, jpeg, thiepha, cedric, woohyun, Blackmole
    
    Reviewed By: Jaehyun_Cho
    
    Differential Revision: https://phab.enlightenment.org/D5600
---
 src/bin/elementary/test_ui_popup.c |  2 +-
 src/lib/elementary/efl_ui_popup.c  | 12 ++++++++++++
 src/lib/elementary/efl_ui_popup.eo | 11 +++++++++++
 3 files changed, 24 insertions(+), 1 deletion(-)

diff --git a/src/bin/elementary/test_ui_popup.c 
b/src/bin/elementary/test_ui_popup.c
index 3db83fb123..1486d49313 100644
--- a/src/bin/elementary/test_ui_popup.c
+++ b/src/bin/elementary/test_ui_popup.c
@@ -57,7 +57,7 @@ _create_popup(efl_ui_popup_data *p_data)
 
    efl_event_callback_add(efl_ui_popup, EFL_UI_POPUP_EVENT_BACKWALL_CLICKED, 
_backwall_clicked, NULL);
    efl_event_callback_add(efl_ui_popup, EFL_UI_POPUP_EVENT_TIMEOUT, 
_timeout_cb, p_data);
-   efl_gfx_size_set(efl_ui_popup, EINA_SIZE2D(160, 160));
+   efl_ui_popup_size_set(efl_ui_popup, EINA_SIZE2D(160, 160));
 
    Eo *btn = efl_add(EFL_UI_BUTTON_CLASS, efl_ui_popup);
    efl_text_set(btn, "Efl.Ui.Popup");
diff --git a/src/lib/elementary/efl_ui_popup.c 
b/src/lib/elementary/efl_ui_popup.c
index dc52e78a78..14ba8dccac 100644
--- a/src/lib/elementary/efl_ui_popup.c
+++ b/src/lib/elementary/efl_ui_popup.c
@@ -120,6 +120,18 @@ _efl_ui_popup_align_get(Eo *obj EINA_UNUSED, 
Efl_Ui_Popup_Data *pd)
    return pd->align;
 }
 
+EOLIAN static void
+_efl_ui_popup_popup_size_set(Eo *obj, Efl_Ui_Popup_Data *pd EINA_UNUSED, 
Eina_Size2D size)
+{
+   efl_gfx_size_set(obj, size);
+}
+
+EOLIAN static Eina_Size2D
+_efl_ui_popup_popup_size_get(Eo *obj, Efl_Ui_Popup_Data *pd EINA_UNUSED)
+{
+   return efl_gfx_size_get(obj);
+}
+
 static Eina_Bool
 _timer_cb(void *data)
 {
diff --git a/src/lib/elementary/efl_ui_popup.eo 
b/src/lib/elementary/efl_ui_popup.eo
index 357b5d8773..af18344a69 100644
--- a/src/lib/elementary/efl_ui_popup.eo
+++ b/src/lib/elementary/efl_ui_popup.eo
@@ -36,6 +36,17 @@ class Efl.Ui.Popup(Efl.Ui.Layout, Efl.Content)
              time: double; [[Timeout in seconds]]
          }
       }
+      @property popup_size {
+         set {
+            [[Set the popup size.]]
+         }
+         get {
+            [[get the current popup size.]]
+         }
+         values {
+            size: Eina.Size2D;
+         }
+      }
    }
    parts {
       backwall: Efl.Ui.Popup.Part; [[A backwall behind the popup.]]

-- 


Reply via email to