Move Application trait to advanced module

This commit is contained in:
Héctor Ramón Jiménez 2024-03-17 19:38:42 +01:00
parent 943b6c9657
commit cdb18e610a
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
6 changed files with 48 additions and 51 deletions

View file

@ -1,5 +1,5 @@
use iced::application;
use iced::gradient;
use iced::program;
use iced::widget::{
checkbox, column, container, horizontal_space, row, slider, text,
};
@ -95,14 +95,16 @@ impl Gradient {
.into()
}
fn style(&self, theme: &Theme) -> application::Appearance {
fn style(&self, theme: &Theme) -> program::Appearance {
use program::DefaultStyle;
if self.transparent {
application::Appearance {
program::Appearance {
background_color: Color::TRANSPARENT,
text_color: theme.palette().text,
}
} else {
application::default(theme)
Theme::default_style(theme)
}
}
}