forked from enlightenment/efl
efl_ui_popup: remove efl_ui_popup_position_set
Summary: Remove efl_ui_popup_position_set. Its functionality is replaced with efl_gfx_position_set. Test Plan: 1. elementary_test -to efluipopup Reviewers: Jaehyun_Cho, herb, thiepha, woohyun, jpeg, cedric Reviewed By: Jaehyun_Cho Differential Revision: https://phab.enlightenment.org/D5129
This commit is contained in:
parent
0365bf1e13
commit
2e9042fae1
|
@ -1006,7 +1006,7 @@ static void
|
|||
_position_set_cb(void *data, Evas_Object *obj EINA_UNUSED,
|
||||
void *event_info EINA_UNUSED)
|
||||
{
|
||||
efl_ui_popup_position_set(data, 0, 0);
|
||||
evas_object_move(data, 0, 0);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -26,6 +26,7 @@ _bg_clicked_cb(void *data,
|
|||
EOLIAN static void
|
||||
_efl_ui_popup_efl_gfx_position_set(Eo *obj, Efl_Ui_Popup_Data *pd EINA_UNUSED, Eina_Position2D pos)
|
||||
{
|
||||
pd->align = EFL_UI_POPUP_ALIGN_NONE;
|
||||
efl_gfx_position_set(efl_super(obj, MY_CLASS), pos);
|
||||
}
|
||||
|
||||
|
@ -52,19 +53,19 @@ _calc_align(Evas_Object *obj)
|
|||
switch (align)
|
||||
{
|
||||
case EFL_UI_POPUP_ALIGN_CENTER:
|
||||
evas_object_move(obj, x + ((w - pw ) / 2), y + ((h - ph) / 2));
|
||||
efl_gfx_position_set(efl_super(obj, MY_CLASS), EINA_POSITION2D(x + ((w - pw ) / 2), y + ((h - ph) / 2)));
|
||||
break;
|
||||
case EFL_UI_POPUP_ALIGN_LEFT:
|
||||
evas_object_move(obj, x, y + ((h - ph) / 2));
|
||||
efl_gfx_position_set(efl_super(obj, MY_CLASS), EINA_POSITION2D(x, y + ((h - ph) / 2)));
|
||||
break;
|
||||
case EFL_UI_POPUP_ALIGN_RIGHT:
|
||||
evas_object_move(obj, x + (w - pw), ((h - ph) / 2));
|
||||
efl_gfx_position_set(efl_super(obj, MY_CLASS), EINA_POSITION2D(x + (w - pw), ((h - ph) / 2)));
|
||||
break;
|
||||
case EFL_UI_POPUP_ALIGN_TOP:
|
||||
evas_object_move(obj, x + ((w - pw) / 2), y);
|
||||
efl_gfx_position_set(efl_super(obj, MY_CLASS), EINA_POSITION2D(x + ((w - pw) / 2), y));
|
||||
break;
|
||||
case EFL_UI_POPUP_ALIGN_BOTTOM:
|
||||
evas_object_move(obj, x + ((w - pw) / 2), y + (h - ph));
|
||||
efl_gfx_position_set(efl_super(obj, MY_CLASS), EINA_POSITION2D(x + ((w - pw) / 2), y + (h - ph)));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -120,13 +121,6 @@ _efl_ui_popup_parent_window_get(Eo *obj EINA_UNUSED, Efl_Ui_Popup_Data *pd)
|
|||
return pd->win_parent;
|
||||
}
|
||||
|
||||
EOLIAN void
|
||||
_efl_ui_popup_position_set(Eo *obj, Efl_Ui_Popup_Data *pd, int x, int y)
|
||||
{
|
||||
evas_object_move(obj, x, y);
|
||||
pd->align = EFL_UI_POPUP_ALIGN_NONE;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_ui_popup_align_set(Eo *obj EINA_UNUSED, Efl_Ui_Popup_Data *pd, Efl_Ui_Popup_Align type)
|
||||
{
|
||||
|
|
|
@ -39,15 +39,6 @@ class Efl.Ui.Popup(Efl.Ui.Layout)
|
|||
repeat: bool; [[If $true, events are passed to lower objects.]]
|
||||
}
|
||||
}
|
||||
@property position {
|
||||
set {
|
||||
[[Set the current popup position.]]
|
||||
}
|
||||
values {
|
||||
x: int;
|
||||
y: int;
|
||||
}
|
||||
}
|
||||
@property align {
|
||||
set {
|
||||
[[ Set the popup alignment.]]
|
||||
|
|
Loading…
Reference in New Issue