diff options
author | 2020-01-05 19:29:12 +0100 | |
---|---|---|
committer | 2020-01-05 19:29:12 +0100 | |
commit | 1a0effa961344677daf17b4192243423a154f1bf (patch) | |
tree | 954d2431d69004c1037d19c3bb930273347df8d4 /examples/tour.rs | |
parent | 2116fbb3c2412030a676c60d65784b9dfa467a0a (diff) | |
download | iced-1a0effa961344677daf17b4192243423a154f1bf.tar.gz iced-1a0effa961344677daf17b4192243423a154f1bf.tar.bz2 iced-1a0effa961344677daf17b4192243423a154f1bf.zip |
Add border and shadow styling to `Button`
Diffstat (limited to 'examples/tour.rs')
-rw-r--r-- | examples/tour.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/examples/tour.rs b/examples/tour.rs index d006d397..84e5d516 100644 --- a/examples/tour.rs +++ b/examples/tour.rs @@ -27,7 +27,7 @@ impl Sandbox for Tour { scroll: scrollable::State::new(), back_button: button::State::new(), next_button: button::State::new(), - debug: true, + debug: false, } } @@ -743,7 +743,7 @@ pub enum Layout { } mod style { - use iced::{button, Background, Color}; + use iced::{button, Background, Color, Vector}; pub enum Button { Primary, @@ -758,15 +758,16 @@ mod style { Button::Secondary => Color::from_rgb(0.5, 0.5, 0.5), })), border_radius: 12, - shadow_offset: 1.0, + shadow_offset: Vector::new(1.0, 1.0), text_color: Color::from_rgb8(0xEE, 0xEE, 0xEE), + ..button::Style::default() } } fn hovered(&self) -> button::Style { button::Style { text_color: Color::WHITE, - shadow_offset: 2.0, + shadow_offset: Vector::new(1.0, 2.0), ..self.active() } } |