forked from enlightenment/efl
elementary/mapbuf - fix the mapbuf to update it's contents correctly even if they go outside of the buffer
SVN revision: 79813
This commit is contained in:
parent
565c820e5d
commit
7eca1cc39a
|
@ -715,4 +715,10 @@
|
||||||
* Free the text parts of the naviframe item when item is deleted.
|
* Free the text parts of the naviframe item when item is deleted.
|
||||||
|
|
||||||
2012-11-26 Daniel Zaoui and Yaakov Goldberg
|
2012-11-26 Daniel Zaoui and Yaakov Goldberg
|
||||||
|
|
||||||
* Porting of Elementary to Eo
|
* Porting of Elementary to Eo
|
||||||
|
|
||||||
|
2012-11-29 ChunEon Park (Hermet)
|
||||||
|
|
||||||
|
* Fix the mapbuf to update it's contents correctly, even if they go
|
||||||
|
outside of the buffer
|
||||||
|
|
|
@ -65,6 +65,7 @@ Fixes:
|
||||||
* Fix the naviframe to clear the title contents when it's item is deleted.
|
* Fix the naviframe to clear the title contents when it's item is deleted.
|
||||||
* Fix entry to enable have_selection only when a text is actually selected.
|
* Fix entry to enable have_selection only when a text is actually selected.
|
||||||
* Fix the naviframe to clear the text parts when it's item is deleted.
|
* Fix the naviframe to clear the text parts when it's item is deleted.
|
||||||
|
* Fix the mapbuf to update it's content correcltly evenif they go outside of the buffer.
|
||||||
|
|
||||||
Removals:
|
Removals:
|
||||||
|
|
||||||
|
|
|
@ -113,20 +113,40 @@ _configure(Evas_Object *obj)
|
||||||
ELM_MAPBUF_DATA_GET(obj, sd);
|
ELM_MAPBUF_DATA_GET(obj, sd);
|
||||||
Elm_Widget_Smart_Data *wd = eo_data_get(obj, ELM_OBJ_WIDGET_CLASS);
|
Elm_Widget_Smart_Data *wd = eo_data_get(obj, ELM_OBJ_WIDGET_CLASS);
|
||||||
|
|
||||||
if (sd->content)
|
if (!sd->content) return;
|
||||||
{
|
Evas_Coord x, y, w, h, x2, y2, w2, h2;
|
||||||
Evas_Coord x, y, w, h, x2, y2;
|
evas_object_geometry_get(wd->resize_obj, &x, &y, &w, &h);
|
||||||
|
evas_object_geometry_get(sd->content, &x2, &y2, &w2, &h2);
|
||||||
|
|
||||||
evas_object_geometry_get
|
if ((x != x2) || (y != y2))
|
||||||
(wd->resize_obj, &x, &y, &w, &h);
|
{
|
||||||
evas_object_geometry_get(sd->content, &x2, &y2, NULL, NULL);
|
if (!sd->enabled)
|
||||||
if ((x != x2) || (y != y2))
|
evas_object_move(sd->content, x, y);
|
||||||
|
else
|
||||||
{
|
{
|
||||||
if (!sd->enabled)
|
//Let give the chance to update the content whenever content is
|
||||||
|
//coming inside buffer from the outside. It means the content may
|
||||||
|
//have been changed when it is on the outside, but the surface
|
||||||
|
//may not be updated because contents would be outside of the
|
||||||
|
//viewport.
|
||||||
|
Evas_Coord output_w, output_h;
|
||||||
|
Evas *e = evas_object_evas_get(obj);
|
||||||
|
evas_output_size_get(e, &output_w, &output_h);
|
||||||
|
Eina_Bool update = EINA_FALSE;
|
||||||
|
|
||||||
|
if ((x2 >= output_w) || (y2 >= output_h) ||
|
||||||
|
((x2 + w2) <= 0) || ((y2 + h2) <= 0))
|
||||||
|
sd->outside = EINA_TRUE;
|
||||||
|
else if (sd->outside)
|
||||||
|
{
|
||||||
|
sd->outside = EINA_FALSE;
|
||||||
|
update = EINA_TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (update)
|
||||||
evas_object_move(sd->content, x, y);
|
evas_object_move(sd->content, x, y);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Evas *e = evas_object_evas_get(obj);
|
|
||||||
evas_smart_objects_calculate(e);
|
evas_smart_objects_calculate(e);
|
||||||
evas_nochange_push(e);
|
evas_nochange_push(e);
|
||||||
evas_object_move(sd->content, x, y);
|
evas_object_move(sd->content, x, y);
|
||||||
|
|
|
@ -25,6 +25,7 @@ struct _Elm_Mapbuf_Smart_Data
|
||||||
Eina_Bool enabled : 1;
|
Eina_Bool enabled : 1;
|
||||||
Eina_Bool smooth : 1;
|
Eina_Bool smooth : 1;
|
||||||
Eina_Bool alpha : 1;
|
Eina_Bool alpha : 1;
|
||||||
|
Eina_Bool outside : 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue