diff options
| author | 2022-11-03 03:27:55 +0100 | |
|---|---|---|
| committer | 2022-11-03 03:27:55 +0100 | |
| commit | df7877767567cc0c7f48d2d6da4680a55f0f7b6d (patch) | |
| tree | 66773a33f34b2d31b10d3d1bee69e264760160a0 /style | |
| parent | f04336dd5cf5e15bbcf48cd54b7e97c569c07a92 (diff) | |
| download | iced-df7877767567cc0c7f48d2d6da4680a55f0f7b6d.tar.gz iced-df7877767567cc0c7f48d2d6da4680a55f0f7b6d.tar.bz2 iced-df7877767567cc0c7f48d2d6da4680a55f0f7b6d.zip | |
Box `Custom` in `Theme`
Diffstat (limited to 'style')
| -rw-r--r-- | style/src/theme.rs | 8 | 
1 files changed, 4 insertions, 4 deletions
| diff --git a/style/src/theme.rs b/style/src/theme.rs index 723c60d6..a253e990 100644 --- a/style/src/theme.rs +++ b/style/src/theme.rs @@ -21,19 +21,19 @@ use crate::toggler;  use iced_core::{Background, Color}; -#[derive(Debug, Clone, Copy, PartialEq)] +#[derive(Debug, Clone, PartialEq)]  pub enum Theme {      Light,      Dark, -    Custom(Custom), +    Custom(Box<Custom>),  }  impl Theme {      pub fn custom(palette: Palette) -> Self { -        Self::Custom(Custom::new(palette)) +        Self::Custom(Box::new(Custom::new(palette)))      } -    pub fn palette(self) -> Palette { +    pub fn palette(&self) -> Palette {          match self {              Self::Light => Palette::LIGHT,              Self::Dark => Palette::DARK, | 
