summaryrefslogtreecommitdiffstats
path: root/examples/solar_system/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/solar_system/src/main.rs')
-rw-r--r--examples/solar_system/src/main.rs12
1 files changed, 8 insertions, 4 deletions
diff --git a/examples/solar_system/src/main.rs b/examples/solar_system/src/main.rs
index 56787a99..9e303576 100644
--- a/examples/solar_system/src/main.rs
+++ b/examples/solar_system/src/main.rs
@@ -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> {