st: Make StScrollables' paint volume reflect the unconstrained view

And constrain it in StScrollView instead (instead of falling back to an
infinite paint volume, as the actor as paint/pick impls, but no
corresponding get_paint_volume one).

Fixes artifacts with the AppView (and possibly other places) when paint
volumes are aggressively cached.
This commit is contained in:
Carlos Garnacho
2018-05-16 23:57:38 +02:00
committed by Georges Basile Stavracas Neto
parent e3ebc8d0c6
commit 4bf033a885
2 changed files with 40 additions and 3 deletions

View File

@ -304,6 +304,13 @@ st_scroll_view_pick (ClutterActor *actor,
clutter_actor_paint (priv->vscroll);
}
static gboolean
st_scroll_view_get_paint_volume (ClutterActor *actor,
ClutterPaintVolume *volume)
{
return clutter_paint_volume_set_from_allocation (volume, actor);
}
static double
get_scrollbar_width (StScrollView *scroll,
gfloat for_height)
@ -793,6 +800,7 @@ st_scroll_view_class_init (StScrollViewClass *klass)
actor_class->paint = st_scroll_view_paint;
actor_class->pick = st_scroll_view_pick;
actor_class->get_paint_volume = st_scroll_view_get_paint_volume;
actor_class->get_preferred_width = st_scroll_view_get_preferred_width;
actor_class->get_preferred_height = st_scroll_view_get_preferred_height;
actor_class->allocate = st_scroll_view_allocate;