Add image and hash snapshot-based testing to iced_test
This commit is contained in:
parent
8e3636d769
commit
1aeb317f2d
17 changed files with 280 additions and 105 deletions
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue