forked from enlightenment/efl
elementary: Reduce EO calls by using geometry_set
This patch reduces EO calls by using evas_object_geometry_set rather than calling move & resize.
This commit is contained in:
parent
f7c073d77c
commit
98c8c7bf91
|
@ -1030,8 +1030,7 @@ _hoversel_position(Evas_Object *obj)
|
||||||
cx = w - mw;
|
cx = w - mw;
|
||||||
if (cy + mh > h)
|
if (cy + mh > h)
|
||||||
cy = h - mh;
|
cy = h - mh;
|
||||||
evas_object_move(sd->hoversel, x + cx, y + cy);
|
evas_object_geometry_set(sd->hoversel, x + cx, y + cy, mw, mh);
|
||||||
evas_object_resize(sd->hoversel, mw, mh);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -3324,16 +3323,16 @@ _update_text_cursors(Eo *obj)
|
||||||
if (hh < 1) hh = 1;
|
if (hh < 1) hh = 1;
|
||||||
if (sd->cursor)
|
if (sd->cursor)
|
||||||
{
|
{
|
||||||
evas_object_move(sd->cursor, off.x + xx, off.y + yy);
|
evas_object_geometry_set(sd->cursor, off.x + xx, off.y + yy, ww, hh);
|
||||||
evas_object_resize(sd->cursor, ww, hh);
|
|
||||||
}
|
}
|
||||||
if (sd->cursor_bidi)
|
if (sd->cursor_bidi)
|
||||||
{
|
{
|
||||||
if (bidi_cursor)
|
if (bidi_cursor)
|
||||||
{
|
{
|
||||||
evas_object_move(sd->cursor_bidi, off.x + xx2, off.y + yy2 + (hh / 2));
|
evas_object_geometry_set(sd->cursor_bidi,
|
||||||
|
off.x + xx2, off.y + yy2 + (hh / 2),
|
||||||
|
ww, hh / 2);
|
||||||
evas_object_resize(sd->cursor, ww, hh / 2);
|
evas_object_resize(sd->cursor, ww, hh / 2);
|
||||||
evas_object_resize(sd->cursor_bidi, ww, hh / 2);
|
|
||||||
evas_object_show(sd->cursor_bidi);
|
evas_object_show(sd->cursor_bidi);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -3403,8 +3402,8 @@ _update_text_selection(Eo *obj, Eo *text_obj)
|
||||||
|
|
||||||
if (rect->obj_bg)
|
if (rect->obj_bg)
|
||||||
{
|
{
|
||||||
evas_object_move(rect->obj_bg, off.x + r->x, off.y + r->y);
|
evas_object_geometry_set(rect->obj_bg, off.x + r->x, off.y + r->y,
|
||||||
evas_object_resize(rect->obj_bg, r->w, r->h);
|
r->w, r->h);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
eina_iterator_free(range);
|
eina_iterator_free(range);
|
||||||
|
@ -3655,20 +3654,23 @@ _anchors_update(Eo *obj, Efl_Ui_Text_Data *sd)
|
||||||
rect = eina_list_data_get(l);
|
rect = eina_list_data_get(l);
|
||||||
if (rect->obj_bg)
|
if (rect->obj_bg)
|
||||||
{
|
{
|
||||||
evas_object_move(rect->obj_bg, off.x + r->x, off.y + r->y);
|
evas_object_geometry_set(rect->obj_bg,
|
||||||
evas_object_resize(rect->obj_bg, r->w, r->h);
|
off.x + r->x, off.y + r->y,
|
||||||
|
r->w, r->h);
|
||||||
evas_object_show(rect->obj_bg);
|
evas_object_show(rect->obj_bg);
|
||||||
}
|
}
|
||||||
if (rect->obj_fg)
|
if (rect->obj_fg)
|
||||||
{
|
{
|
||||||
evas_object_move(rect->obj_fg, off.x + r->x, off.y + r->y);
|
evas_object_geometry_set(rect->obj_fg,
|
||||||
evas_object_resize(rect->obj_fg, r->w, r->h);
|
off.x + r->x, off.y + r->y,
|
||||||
|
r->w, r->h);
|
||||||
evas_object_show(rect->obj_fg);
|
evas_object_show(rect->obj_fg);
|
||||||
}
|
}
|
||||||
if (rect->obj)
|
if (rect->obj)
|
||||||
{
|
{
|
||||||
evas_object_move(rect->obj, off.x + r->x, off.y + r->y);
|
evas_object_geometry_set(rect->obj,
|
||||||
evas_object_resize(rect->obj, r->w, r->h);
|
off.x + r->x, off.y + r->y,
|
||||||
|
r->w, r->h);
|
||||||
evas_object_show(rect->obj);
|
evas_object_show(rect->obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue