use iced_native::Color;
use crate::style::default_colors;
#[derive(Debug, Clone)]
pub enum Appearance {
Circle(CircleAppearance),
Square(SquareAppearance),
Invisible,
}
#[derive(Debug, Clone)]
pub struct CircleAppearance {
pub color: Color,
pub border_width: f32,
pub border_color: Color,
}
impl Default for CircleAppearance {
fn default() -> Self {
CircleAppearance {
color: default_colors::LIGHT_BACK,
border_width: 1.0,
border_color: default_colors::BORDER,
}
}
}
#[derive(Debug, Clone)]
pub struct SquareAppearance {
pub color: Color,
pub border_width: f32,
pub border_radius: f32,
pub border_color: Color,
}
pub trait StyleSheet {
type Style: Default;
fn active(&self, style: &Self::Style) -> Appearance;
fn hovered(&self, style: &Self::Style) -> Appearance;
fn dragging(&self, style: &Self::Style) -> Appearance;
}