summaryrefslogtreecommitdiff
path: root/src/lib/elementary/efl_ui_popup.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/elementary/efl_ui_popup.c')
-rw-r--r--src/lib/elementary/efl_ui_popup.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/lib/elementary/efl_ui_popup.c b/src/lib/elementary/efl_ui_popup.c
index a81ff67..5db1415 100644
--- a/src/lib/elementary/efl_ui_popup.c
+++ b/src/lib/elementary/efl_ui_popup.c
@@ -26,6 +26,7 @@ _bg_clicked_cb(void *data,
26EOLIAN static void 26EOLIAN static void
27_efl_ui_popup_efl_gfx_position_set(Eo *obj, Efl_Ui_Popup_Data *pd EINA_UNUSED, Eina_Position2D pos) 27_efl_ui_popup_efl_gfx_position_set(Eo *obj, Efl_Ui_Popup_Data *pd EINA_UNUSED, Eina_Position2D pos)
28{ 28{
29 pd->align = EFL_UI_POPUP_ALIGN_NONE;
29 efl_gfx_position_set(efl_super(obj, MY_CLASS), pos); 30 efl_gfx_position_set(efl_super(obj, MY_CLASS), pos);
30} 31}
31 32
@@ -52,19 +53,19 @@ _calc_align(Evas_Object *obj)
52 switch (align) 53 switch (align)
53 { 54 {
54 case EFL_UI_POPUP_ALIGN_CENTER: 55 case EFL_UI_POPUP_ALIGN_CENTER:
55 evas_object_move(obj, x + ((w - pw ) / 2), y + ((h - ph) / 2)); 56 efl_gfx_position_set(efl_super(obj, MY_CLASS), EINA_POSITION2D(x + ((w - pw ) / 2), y + ((h - ph) / 2)));
56 break; 57 break;
57 case EFL_UI_POPUP_ALIGN_LEFT: 58 case EFL_UI_POPUP_ALIGN_LEFT:
58 evas_object_move(obj, x, y + ((h - ph) / 2)); 59 efl_gfx_position_set(efl_super(obj, MY_CLASS), EINA_POSITION2D(x, y + ((h - ph) / 2)));
59 break; 60 break;
60 case EFL_UI_POPUP_ALIGN_RIGHT: 61 case EFL_UI_POPUP_ALIGN_RIGHT:
61 evas_object_move(obj, x + (w - pw), ((h - ph) / 2)); 62 efl_gfx_position_set(efl_super(obj, MY_CLASS), EINA_POSITION2D(x + (w - pw), ((h - ph) / 2)));
62 break; 63 break;
63 case EFL_UI_POPUP_ALIGN_TOP: 64 case EFL_UI_POPUP_ALIGN_TOP:
64 evas_object_move(obj, x + ((w - pw) / 2), y); 65 efl_gfx_position_set(efl_super(obj, MY_CLASS), EINA_POSITION2D(x + ((w - pw) / 2), y));
65 break; 66 break;
66 case EFL_UI_POPUP_ALIGN_BOTTOM: 67 case EFL_UI_POPUP_ALIGN_BOTTOM:
67 evas_object_move(obj, x + ((w - pw) / 2), y + (h - ph)); 68 efl_gfx_position_set(efl_super(obj, MY_CLASS), EINA_POSITION2D(x + ((w - pw) / 2), y + (h - ph)));
68 break; 69 break;
69 default: 70 default:
70 break; 71 break;
@@ -120,13 +121,6 @@ _efl_ui_popup_parent_window_get(Eo *obj EINA_UNUSED, Efl_Ui_Popup_Data *pd)
120 return pd->win_parent; 121 return pd->win_parent;
121} 122}
122 123
123EOLIAN void
124_efl_ui_popup_position_set(Eo *obj, Efl_Ui_Popup_Data *pd, int x, int y)
125{
126 evas_object_move(obj, x, y);
127 pd->align = EFL_UI_POPUP_ALIGN_NONE;
128}
129
130EOLIAN static void 124EOLIAN static void
131_efl_ui_popup_align_set(Eo *obj EINA_UNUSED, Efl_Ui_Popup_Data *pd, Efl_Ui_Popup_Align type) 125_efl_ui_popup_align_set(Eo *obj EINA_UNUSED, Efl_Ui_Popup_Data *pd, Efl_Ui_Popup_Align type)
132{ 126{