Derive Copy for Theme
This commit is contained in:
parent
9966c6f883
commit
708be32e3d
3 changed files with 4 additions and 4 deletions
|
|
@ -80,7 +80,7 @@ impl<Message> canvas::Program<Message> for Arc {
|
|||
_cursor: Cursor,
|
||||
) -> Vec<Geometry> {
|
||||
let geometry = self.cache.draw(bounds.size(), |frame| {
|
||||
let palette = theme.clone().palette();
|
||||
let palette = theme.palette();
|
||||
|
||||
let center = frame.center();
|
||||
let radius = frame.width().min(frame.height()) / 5.0;
|
||||
|
|
|
|||
|
|
@ -159,6 +159,6 @@ impl Sandbox for Styling {
|
|||
}
|
||||
|
||||
fn theme(&self) -> Theme {
|
||||
self.theme.clone()
|
||||
self.theme
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ use crate::toggler;
|
|||
|
||||
use iced_core::{Background, Color};
|
||||
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
pub enum Theme {
|
||||
Light,
|
||||
Dark,
|
||||
|
|
@ -56,7 +56,7 @@ impl Default for Theme {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
pub struct Custom {
|
||||
palette: Palette,
|
||||
extended: Extended,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue