diff options
author | 2024-12-06 04:06:41 +0100 | |
---|---|---|
committer | 2024-12-10 04:51:08 +0100 | |
commit | 1aeb317f2dbfb63215e6226073e67878ffa6503b (patch) | |
tree | d883266d796360a1e4d883dc82a4fb284f724790 /examples/gradient | |
parent | 8e3636d769d96ab5ba49a9647b72c59ae2226dd0 (diff) | |
download | iced-1aeb317f2dbfb63215e6226073e67878ffa6503b.tar.gz iced-1aeb317f2dbfb63215e6226073e67878ffa6503b.tar.bz2 iced-1aeb317f2dbfb63215e6226073e67878ffa6503b.zip |
Add image and hash snapshot-based testing to `iced_test`
Diffstat (limited to 'examples/gradient')
-rw-r--r-- | examples/gradient/src/main.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/examples/gradient/src/main.rs b/examples/gradient/src/main.rs index b2de069f..910ea9fc 100644 --- a/examples/gradient/src/main.rs +++ b/examples/gradient/src/main.rs @@ -1,5 +1,5 @@ -use iced::application; use iced::gradient; +use iced::theme; use iced::widget::{ checkbox, column, container, horizontal_space, row, slider, text, }; @@ -95,16 +95,14 @@ impl Gradient { .into() } - fn style(&self, theme: &Theme) -> application::Appearance { - use application::DefaultStyle; - + fn style(&self, theme: &Theme) -> theme::Style { if self.transparent { - application::Appearance { + theme::Style { background_color: Color::TRANSPARENT, text_color: theme.palette().text, } } else { - Theme::default_style(theme) + theme::default(theme) } } } |