diff options
author | 2024-03-08 14:00:28 +0100 | |
---|---|---|
committer | 2024-03-08 14:00:28 +0100 | |
commit | edf7d7ca7593f660f4b15f154257471c26df87de (patch) | |
tree | 7cee3cbfbeb2ae5145f1bf6087b61fce4cbed8c9 /winit/src/application/state.rs | |
parent | 2074757cdc65ec16eeb1c7a12a5ff3bb5ed00859 (diff) | |
parent | 8919f2593e39f76b273513e959fa6d5ffb78fde2 (diff) | |
download | iced-edf7d7ca7593f660f4b15f154257471c26df87de.tar.gz iced-edf7d7ca7593f660f4b15f154257471c26df87de.tar.bz2 iced-edf7d7ca7593f660f4b15f154257471c26df87de.zip |
Merge pull request #2312 from iced-rs/theming-reloaded
Theming reloaded
Diffstat (limited to 'winit/src/application/state.rs')
-rw-r--r-- | winit/src/application/state.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/winit/src/application/state.rs b/winit/src/application/state.rs index c17a3bcc..a0a06933 100644 --- a/winit/src/application/state.rs +++ b/winit/src/application/state.rs @@ -1,4 +1,4 @@ -use crate::application::{self, StyleSheet as _}; +use crate::application; use crate::conversion; use crate::core::mouse; use crate::core::{Color, Size}; @@ -14,7 +14,7 @@ use winit::window::Window; #[allow(missing_debug_implementations)] pub struct State<A: Application> where - A::Theme: application::StyleSheet, + A::Theme: application::DefaultStyle, { title: String, scale_factor: f64, @@ -29,14 +29,14 @@ where impl<A: Application> State<A> where - A::Theme: application::StyleSheet, + A::Theme: application::DefaultStyle, { /// Creates a new [`State`] for the provided [`Application`] and window. pub fn new(application: &A, window: &Window) -> Self { let title = application.title(); let scale_factor = application.scale_factor(); let theme = application.theme(); - let appearance = theme.appearance(&application.style()); + let appearance = application.style(&theme); let viewport = { let physical_size = window.inner_size(); @@ -216,6 +216,6 @@ where // Update theme and appearance self.theme = application.theme(); - self.appearance = self.theme.appearance(&application.style()); + self.appearance = application.style(&self.theme); } } |