summaryrefslogtreecommitdiffstats
path: root/examples/scrollable
diff options
context:
space:
mode:
Diffstat (limited to 'examples/scrollable')
-rw-r--r--examples/scrollable/src/main.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/examples/scrollable/src/main.rs b/examples/scrollable/src/main.rs
index 3038661e..1ba81609 100644
--- a/examples/scrollable/src/main.rs
+++ b/examples/scrollable/src/main.rs
@@ -1,4 +1,6 @@
-use iced::widget::scrollable::{Properties, Scrollbar, Scroller};
+use iced::widget::scrollable::{
+ Properties, ScrollbarProperties, Scrollbar, Scroller,
+};
use iced::widget::{
button, column, container, horizontal_space, progress_bar, radio, row,
scrollable, slider, text, vertical_space,
@@ -199,12 +201,12 @@ impl Application for ScrollableDemo {
.spacing(40),
)
.height(Length::Fill)
- .vertical_scroll(
+ .scrollbar_properties(ScrollbarProperties::Vertical(
Properties::new()
.width(self.scrollbar_width)
.margin(self.scrollbar_margin)
.scroller_width(self.scroller_width),
- )
+ ))
.id(SCROLLABLE_ID.clone())
.on_scroll(Message::Scrolled),
Direction::Horizontal => scrollable(
@@ -223,12 +225,12 @@ impl Application for ScrollableDemo {
.spacing(40),
)
.height(Length::Fill)
- .horizontal_scroll(
+ .scrollbar_properties(ScrollbarProperties::Horizontal(
Properties::new()
.width(self.scrollbar_width)
.margin(self.scrollbar_margin)
.scroller_width(self.scroller_width),
- )
+ ))
.style(theme::Scrollable::custom(ScrollbarCustomStyle))
.id(SCROLLABLE_ID.clone())
.on_scroll(Message::Scrolled),
@@ -264,18 +266,16 @@ impl Application for ScrollableDemo {
.spacing(40),
)
.height(Length::Fill)
- .vertical_scroll(
+ .scrollbar_properties(ScrollbarProperties::Both(
Properties::new()
.width(self.scrollbar_width)
.margin(self.scrollbar_margin)
.scroller_width(self.scroller_width),
- )
- .horizontal_scroll(
Properties::new()
.width(self.scrollbar_width)
.margin(self.scrollbar_margin)
.scroller_width(self.scroller_width),
- )
+ ))
.style(theme::Scrollable::Custom(Box::new(
ScrollbarCustomStyle,
)))