Fix Scrollable::spacing not embedding the Scrollbar

This commit is contained in:
Héctor Ramón Jiménez 2024-07-16 19:05:46 +02:00
parent 24f7476823
commit b518e30610
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
2 changed files with 28 additions and 45 deletions

View file

@ -216,14 +216,13 @@ impl ScrollableDemo {
.padding([40, 0])
.spacing(40),
)
.direction(scrollable::Direction::Vertical {
scrollbar: scrollable::Scrollbar::new()
.direction(scrollable::Direction::Vertical(
scrollable::Scrollbar::new()
.width(self.scrollbar_width)
.margin(self.scrollbar_margin)
.scroller_width(self.scroller_width)
.anchor(self.anchor),
spacing: None,
})
))
.width(Fill)
.height(Fill)
.id(SCROLLABLE_ID.clone())
@ -243,14 +242,13 @@ impl ScrollableDemo {
.padding([0, 40])
.spacing(40),
)
.direction(scrollable::Direction::Horizontal {
scrollbar: scrollable::Scrollbar::new()
.direction(scrollable::Direction::Horizontal(
scrollable::Scrollbar::new()
.width(self.scrollbar_width)
.margin(self.scrollbar_margin)
.scroller_width(self.scroller_width)
.anchor(self.anchor),
spacing: None,
})
))
.width(Fill)
.height(Fill)
.id(SCROLLABLE_ID.clone())