summaryrefslogtreecommitdiffstats
path: root/examples/scrollable
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-07-16 19:05:46 +0200
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-07-16 19:05:46 +0200
commitb518e30610fa53691c727852f70b497dd19cfc7a (patch)
tree3dfa0a1e50bd3316f607fad562ff9d5e23f81c34 /examples/scrollable
parent24f74768236dac874a602f7aa7de4ca8a0cc793f (diff)
downloadiced-b518e30610fa53691c727852f70b497dd19cfc7a.tar.gz
iced-b518e30610fa53691c727852f70b497dd19cfc7a.tar.bz2
iced-b518e30610fa53691c727852f70b497dd19cfc7a.zip
Fix `Scrollable::spacing` not embedding the `Scrollbar`
Diffstat (limited to 'examples/scrollable')
-rw-r--r--examples/scrollable/src/main.rs14
1 files changed, 6 insertions, 8 deletions
diff --git a/examples/scrollable/src/main.rs b/examples/scrollable/src/main.rs
index 969f385e..de4f2f9a 100644
--- a/examples/scrollable/src/main.rs
+++ b/examples/scrollable/src/main.rs
@@ -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())