Fix Scrollable scrollbar being rendered behind contents

... by issuing a new clip layer just for the scrollbar itself.
This commit is contained in:
Héctor Ramón 2021-05-03 15:42:02 +07:00
parent 4b8ba8309f
commit 59c2500c55
3 changed files with 38 additions and 15 deletions

View file

@ -134,8 +134,16 @@ where
Primitive::None
};
let scroll = Primitive::Clip {
bounds,
offset: Vector::new(0, 0),
content: Box::new(Primitive::Group {
primitives: vec![scrollbar, scroller],
}),
};
Primitive::Group {
primitives: vec![clip, scrollbar, scroller],
primitives: vec![clip, scroll],
}
} else {
content