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
This commit is contained in:
Taehyub Kim 2017-12-08 16:06:20 +09:00 committed by Jaehyun Cho
parent adddeabda2
commit 0096a8aa3c
3 changed files with 24 additions and 1 deletions

View File

@ -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");

View File

@ -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)
{

View File

@ -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.]]