libcosmic/src/widget/card/style.rs

24 lines
523 B
Rust
Raw Normal View History

2023-07-17 11:44:57 -04:00
use iced_core::{Background, Color};
/// Appearance of the cards.
#[derive(Clone, Copy)]
pub struct Appearance {
pub card_1: Background,
pub card_2: Background,
}
impl Default for Appearance {
fn default() -> Self {
Self {
card_1: Background::Color(Color::WHITE),
card_2: Background::Color(Color::WHITE),
}
}
}
/// Defines the [`Appearance`] of a cards.
pub trait StyleSheet {
/// The default [`Appearance`] of the cards.
fn default(&self) -> Appearance;
}