struct {
Evas_Coord w, h;
+ Eina_Bool resized : 1;
} child;
struct {
Evas_Coord x, y;
static void _smart_clip_unset(Evas_Object *obj);
static void _smart_init(void);
+static void _elm_smart_scroller_wanted_region_set(Evas_Object *obj);
+
/* local subsystem globals */
static Evas_Smart *_smart = NULL;
{
ecore_animator_del(sd->down.momentum_animator);
sd->down.momentum_animator = NULL;
+ if (sd->child.resized)
+ _elm_smart_scroller_wanted_region_set(sd->smart_obj);
}
}
}
sd->down.dy = 0;
sd->down.pdx = 0;
sd->down.pdy = 0;
+ if (sd->child.resized)
+ _elm_smart_scroller_wanted_region_set(sd->smart_obj);
}
}
ecore_animator_del(sd->down.bounce_x_animator);
sd->down.bounce_x_animator = NULL;
_smart_momentum_end(sd);
+ if (sd->child.resized)
+ _elm_smart_scroller_wanted_region_set(sd->smart_obj);
}
sd->bouncemex = 0;
}
ecore_animator_del(sd->down.bounce_y_animator);
sd->down.bounce_y_animator = NULL;
_smart_momentum_end(sd);
+ if (sd->child.resized)
+ _elm_smart_scroller_wanted_region_set(sd->smart_obj);
}
sd->bouncemey = 0;
}
sd->down.pdx = 0;
sd->bouncemex = 0;
_smart_momentum_end(sd);
+ if (sd->child.resized)
+ _elm_smart_scroller_wanted_region_set(sd->smart_obj);
return ECORE_CALLBACK_CANCEL;
}
}
sd->down.pdy = 0;
sd->bouncemey = 0;
_smart_momentum_end(sd);
+ if (sd->child.resized)
+ _elm_smart_scroller_wanted_region_set(sd->smart_obj);
return ECORE_CALLBACK_CANCEL;
}
}
sd->down.ay = 0;
sd->down.pdx = 0;
sd->down.pdy = 0;
+ if (sd->child.resized)
+ _elm_smart_scroller_wanted_region_set(sd->smart_obj);
return ECORE_CALLBACK_CANCEL;
}
}
{
ecore_animator_del(sd->down.onhold_animator);
sd->down.onhold_animator = NULL;
+ if (sd->child.resized)
+ _elm_smart_scroller_wanted_region_set(sd->smart_obj);
}
if (sd->down.hold_animator)
{
ecore_animator_del(sd->down.hold_animator);
sd->down.hold_animator = NULL;
+ if (sd->child.resized)
+ _elm_smart_scroller_wanted_region_set(sd->smart_obj);
}
sd->pan_func.max_get(sd->pan_obj, &mx, &my);
sd->pan_func.min_get(sd->pan_obj, &minx, &miny);
ecore_animator_del(sd->down.bounce_x_animator);
sd->down.bounce_x_animator = NULL;
sd->bouncemex = 0;
+ if (sd->child.resized)
+ _elm_smart_scroller_wanted_region_set(sd->smart_obj);
}
if (sd->down.bounce_y_animator)
{
ecore_animator_del(sd->down.bounce_y_animator);
sd->down.bounce_y_animator = NULL;
sd->bouncemey = 0;
+ if (sd->child.resized)
+ _elm_smart_scroller_wanted_region_set(sd->smart_obj);
}
if (sd->down.hold_animator)
{
ecore_animator_del(sd->down.hold_animator);
sd->down.hold_animator = NULL;
_smart_drag_stop(sd->smart_obj);
+ if (sd->child.resized)
+ _elm_smart_scroller_wanted_region_set(sd->smart_obj);
}
if (sd->down.momentum_animator)
{
sd->down.ay = 0;
sd->down.pdx = 0;
sd->down.pdy = 0;
+ if (sd->child.resized)
+ _elm_smart_scroller_wanted_region_set(sd->smart_obj);
}
x = nx;
{
ecore_animator_del(sd->down.onhold_animator);
sd->down.onhold_animator = NULL;
+ if (sd->child.resized)
+ _elm_smart_scroller_wanted_region_set(sd->smart_obj);
}
}
else
sd->down.bounce_x_animator || sd->down.bounce_y_animator ||
sd->down.hold_animator || sd->down.onhold_animator) return;
+ sd->child.resized = EINA_FALSE;
+
/* Flip to RTL cords only if init in RTL mode */
- if(sd->is_mirrored)
+ if (sd->is_mirrored)
wx = _elm_smart_scroller_x_mirrored_get(obj, sd->wx);
if (sd->ww == -1)
sd->child.h = h;
_smart_scrollbar_size_adjust(sd);
evas_object_size_hint_min_set(sd->smart_obj, sd->child.w, sd->child.h);
+ sd->child.resized = EINA_TRUE;
_elm_smart_scroller_wanted_region_set(sd->smart_obj);
}
}
ecore_animator_del(sd->down.bounce_x_animator);
sd->down.bounce_x_animator = NULL;
sd->bouncemex = 0;
+ if (sd->child.resized)
+ _elm_smart_scroller_wanted_region_set(sd->smart_obj);
}
if (sd->down.bounce_y_animator)
{
ecore_animator_del(sd->down.bounce_y_animator);
sd->down.bounce_y_animator = NULL;
sd->bouncemey = 0;
+ if (sd->child.resized)
+ _elm_smart_scroller_wanted_region_set(sd->smart_obj);
}
_elm_smart_scroller_wanted_region_set(sd->smart_obj);
}
ecore_animator_del(sd->down.bounce_x_animator);
sd->down.bounce_x_animator = NULL;
sd->bouncemex = 0;
+ if (sd->child.resized)
+ _elm_smart_scroller_wanted_region_set(sd->smart_obj);
}
if (sd->down.bounce_y_animator)
{
ecore_animator_del(sd->down.bounce_y_animator);
sd->down.bounce_y_animator = NULL;
sd->bouncemey = 0;
+ if (sd->child.resized)
+ _elm_smart_scroller_wanted_region_set(sd->smart_obj);
}
if (!ev->direction)
y += ev->z * sd->step.y;
ecore_animator_del(sd->down.bounce_x_animator);
sd->down.bounce_x_animator = NULL;
sd->bouncemex = 0;
+ if (sd->child.resized)
+ _elm_smart_scroller_wanted_region_set(sd->smart_obj);
}
if (sd->down.bounce_y_animator)
{
ecore_animator_del(sd->down.bounce_y_animator);
sd->down.bounce_y_animator = NULL;
sd->bouncemey = 0;
+ if (sd->child.resized)
+ _elm_smart_scroller_wanted_region_set(sd->smart_obj);
}
if (sd->down.hold_animator)
{
ecore_animator_del(sd->down.hold_animator);
sd->down.hold_animator = NULL;
_smart_drag_stop(sd->smart_obj);
+ if (sd->child.resized)
+ _elm_smart_scroller_wanted_region_set(sd->smart_obj);
}
if (sd->down.momentum_animator)
{
sd->down.bounce_y_hold = 0;
sd->down.ax = 0;
sd->down.ay = 0;
+ if (sd->child.resized)
+ _elm_smart_scroller_wanted_region_set(sd->smart_obj);
}
if (ev->button == 1)
{
{
ecore_animator_del(sd->down.onhold_animator);
sd->down.onhold_animator = NULL;
+ if (sd->child.resized)
+ _elm_smart_scroller_wanted_region_set(sd->smart_obj);
}
x = ev->canvas.x - sd->down.x;
y = ev->canvas.y - sd->down.y;
{
ecore_animator_del(sd->down.hold_animator);
sd->down.hold_animator = NULL;
+ if (sd->child.resized)
+ _elm_smart_scroller_wanted_region_set(sd->smart_obj);
}
}
else
{
ecore_animator_del(sd->down.hold_animator);
sd->down.hold_animator = NULL;
+ if (sd->child.resized)
+ _elm_smart_scroller_wanted_region_set(sd->smart_obj);
}
}
if (sd->down.scroll)
elm_smart_scroller_child_pos_get(sd->smart_obj, &x, &y);
elm_smart_scroller_child_pos_set(sd->smart_obj, x, y);
_update_wanted_coordinates(sd, x, y);
+
+ if (sd->child.resized)
+ _elm_smart_scroller_wanted_region_set(sd->smart_obj);
if (!_smart_do_page(sd))
bounce_eval(sd);
{
ecore_animator_del(sd->down.onhold_animator);
sd->down.onhold_animator = NULL;
+ if (sd->child.resized)
+ _elm_smart_scroller_wanted_region_set(sd->smart_obj);
}
}
}