diff options
author | 2024-01-20 13:29:25 +0100 | |
---|---|---|
committer | 2024-01-20 13:29:25 +0100 | |
commit | 25f182f933ea6b7c112c8f9a450a98dc9b9eebdd (patch) | |
tree | fdc498d705f033d3c432e6a06b8cd223dfd82633 /examples/scrollable | |
parent | 4d502012b3e3ed9d9ef80f21078d53d182cdaa1b (diff) | |
download | iced-25f182f933ea6b7c112c8f9a450a98dc9b9eebdd.tar.gz iced-25f182f933ea6b7c112c8f9a450a98dc9b9eebdd.tar.bz2 iced-25f182f933ea6b7c112c8f9a450a98dc9b9eebdd.zip |
Introduce `Border` struct analogous to `Shadow`
Diffstat (limited to 'examples/scrollable')
-rw-r--r-- | examples/scrollable/src/main.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/examples/scrollable/src/main.rs b/examples/scrollable/src/main.rs index 4b57a5a4..ff691917 100644 --- a/examples/scrollable/src/main.rs +++ b/examples/scrollable/src/main.rs @@ -1,10 +1,14 @@ +use iced::executor; +use iced::theme; use iced::widget::scrollable::{Properties, Scrollbar, Scroller}; use iced::widget::{ button, column, container, horizontal_space, progress_bar, radio, row, scrollable, slider, text, vertical_space, }; -use iced::{executor, theme, Alignment, Color}; -use iced::{Application, Command, Element, Length, Settings, Theme}; +use iced::{ + Alignment, Application, Border, Color, Command, Element, Length, Settings, + Theme, +}; use once_cell::sync::Lazy; @@ -373,14 +377,10 @@ impl scrollable::StyleSheet for ScrollbarCustomStyle { background: style .active(&theme::Scrollable::default()) .background, - border_radius: 2.0.into(), - border_width: 0.0, - border_color: Color::default(), + border: Border::with_radius(2), scroller: Scroller { color: Color::from_rgb8(250, 85, 134), - border_radius: 2.0.into(), - border_width: 0.0, - border_color: Color::default(), + border: Border::with_radius(2), }, } } else { |