forked from enlightenment/efl
efl_ui_spotlight: ensure correct positioning
if something is just repositioned, but not resized, it would not have been placed correctly. This fixes that. Differential Revision: https://phab.enlightenment.org/D10762
This commit is contained in:
parent
5978d79858
commit
a66f1130af
|
@ -171,6 +171,20 @@ _resize_cb(void *data, const Efl_Event *ev)
|
|||
efl_ui_spotlight_manager_size_set(pd->transition, pd->page_spec.sz);
|
||||
}
|
||||
|
||||
static void
|
||||
_position_cb(void *data, const Efl_Event *ev EINA_UNUSED)
|
||||
{
|
||||
Efl_Ui_Spotlight_Container_Data *pd = data;
|
||||
|
||||
if (pd->transition)
|
||||
efl_ui_spotlight_manager_size_set(pd->transition, pd->page_spec.sz);
|
||||
}
|
||||
|
||||
EFL_CALLBACKS_ARRAY_DEFINE(spotlight_resized,
|
||||
{EFL_GFX_ENTITY_EVENT_SIZE_CHANGED, _resize_cb},
|
||||
{EFL_GFX_ENTITY_EVENT_POSITION_CHANGED, _position_cb},
|
||||
)
|
||||
|
||||
EOLIAN static Eo *
|
||||
_efl_ui_spotlight_container_efl_object_constructor(Eo *obj,
|
||||
Efl_Ui_Spotlight_Container_Data *pd)
|
||||
|
@ -203,8 +217,7 @@ _efl_ui_spotlight_container_efl_object_constructor(Eo *obj,
|
|||
|
||||
elm_widget_can_focus_set(obj, EINA_FALSE);
|
||||
|
||||
efl_event_callback_add(obj, EFL_GFX_ENTITY_EVENT_SIZE_CHANGED, _resize_cb, pd);
|
||||
|
||||
efl_event_callback_array_add(obj, spotlight_resized(), pd);
|
||||
pd->event = efl_add(EFL_CANVAS_RECTANGLE_CLASS,
|
||||
evas_object_evas_get(obj));
|
||||
evas_object_color_set(pd->event, 0, 0, 0, 0);
|
||||
|
|
Loading…
Reference in New Issue