From dac7e82e0bff128097653fe05829b2d576fcdb2f Mon Sep 17 00:00:00 2001 From: pml68 Date: Mon, 28 Apr 2025 10:56:49 +0200 Subject: refactor(material_theme)!: make `Theme` an enum with `Custom` variant --- crates/material_theme/src/image.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'crates/material_theme/src/image.rs') diff --git a/crates/material_theme/src/image.rs b/crates/material_theme/src/image.rs index de5942a..4251b39 100644 --- a/crates/material_theme/src/image.rs +++ b/crates/material_theme/src/image.rs @@ -1,21 +1,15 @@ -use iced_widget::core::{Background, Border, Color, border}; use iced_widget::image::{Catalog, Style, StyleFn}; use super::Theme; -use crate::utils::{elevation, shadow_from_elevation}; impl Catalog for Theme { type Class<'a> = StyleFn<'a, Self>; fn default<'a>() -> Self::Class<'a> { - Box::new(default) + Box::new(|_theme| Style::default()) } fn style(&self, class: &Self::Class<'_>) -> Style { class(self) } } - -pub fn default(_theme: &Theme) -> Style { - Style::default() -} -- cgit v1.2.3