diff options
author | 2024-03-06 21:27:03 +0100 | |
---|---|---|
committer | 2024-03-06 21:27:03 +0100 | |
commit | 7c4bf70023a8092faad9630c2c87fbf41bd6ab76 (patch) | |
tree | a02aa7fa62276e4e9b870f4f88ba448c0a264e2b /src/sandbox.rs | |
parent | 34e7c6593a9e0f56cee5db18b7258717cf6bc11b (diff) | |
download | iced-7c4bf70023a8092faad9630c2c87fbf41bd6ab76.tar.gz iced-7c4bf70023a8092faad9630c2c87fbf41bd6ab76.tar.bz2 iced-7c4bf70023a8092faad9630c2c87fbf41bd6ab76.zip |
Simplify theming for `Application`
Diffstat (limited to '')
-rw-r--r-- | src/sandbox.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/sandbox.rs b/src/sandbox.rs index 28461929..815652ae 100644 --- a/src/sandbox.rs +++ b/src/sandbox.rs @@ -1,5 +1,5 @@ -use crate::theme::{self, Theme}; -use crate::{Application, Command, Element, Error, Settings, Subscription}; +use crate::application::{self, Application}; +use crate::{Command, Element, Error, Settings, Subscription, Theme}; /// A sandboxed [`Application`]. /// @@ -123,8 +123,8 @@ pub trait Sandbox { /// Returns the current style variant of [`theme::Application`]. /// /// By default, it returns [`theme::Application::default`]. - fn style(&self) -> theme::Application { - theme::Application::default() + fn style(&self, theme: &Theme) -> application::Appearance { + crate::shell::application::default(theme) } /// Returns the scale factor of the [`Sandbox`]. @@ -185,8 +185,8 @@ where T::theme(self) } - fn style(&self) -> theme::Application { - T::style(self) + fn style(&self, theme: &Theme) -> application::Appearance { + T::style(self, theme) } fn subscription(&self) -> Subscription<T::Message> { |