Introduce Custom variants for every style in the built-in Theme
This commit is contained in:
parent
8102f96f12
commit
18fb74f200
34 changed files with 576 additions and 286 deletions
|
|
@ -79,10 +79,14 @@ impl Application for SolarSystem {
|
|||
}
|
||||
|
||||
fn style(&self) -> theme::Application {
|
||||
theme::Application::Custom(|_theme| application::Appearance {
|
||||
background_color: Color::BLACK,
|
||||
text_color: Color::WHITE,
|
||||
})
|
||||
fn dark_background(_theme: &Theme) -> application::Appearance {
|
||||
application::Appearance {
|
||||
background_color: Color::BLACK,
|
||||
text_color: Color::WHITE,
|
||||
}
|
||||
}
|
||||
|
||||
theme::Application::from(dark_background as fn(&Theme) -> _)
|
||||
}
|
||||
|
||||
fn subscription(&self) -> Subscription<Message> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue