use iced_core::Color;
pub trait StyleSheet {
fn picked_split(&self) -> Option<Line>;
fn hovered_split(&self) -> Option<Line>;
}
#[derive(Debug, Clone, Copy, PartialEq)]
pub struct Line {
pub color: Color,
pub width: f32,
}
struct Default;
impl StyleSheet for Default {
fn picked_split(&self) -> Option<Line> {
None
}
fn hovered_split(&self) -> Option<Line> {
None
}
}
impl<'a> std::default::Default for Box<dyn StyleSheet + 'a> {
fn default() -> Self {
Box::new(Default)
}
}
impl<'a, T> From<T> for Box<dyn StyleSheet + 'a>
where
T: StyleSheet + 'a,
{
fn from(style_sheet: T) -> Self {
Box::new(style_sheet)
}
}