cosmic/widget/segmented_button/
style.rsuse iced_core::{border::Radius, Background, Color};
#[derive(Default, Clone, Copy)]
pub struct Appearance {
pub background: Option<Background>,
pub border_radius: Radius,
pub border_bottom: Option<(f32, Color)>,
pub border_end: Option<(f32, Color)>,
pub border_start: Option<(f32, Color)>,
pub border_top: Option<(f32, Color)>,
pub active: ItemStatusAppearance,
pub inactive: ItemStatusAppearance,
pub hover: ItemStatusAppearance,
pub focus: ItemStatusAppearance,
}
#[derive(Default, Clone, Copy)]
pub struct ItemAppearance {
pub border_radius: Radius,
pub border_bottom: Option<(f32, Color)>,
pub border_end: Option<(f32, Color)>,
pub border_start: Option<(f32, Color)>,
pub border_top: Option<(f32, Color)>,
}
#[derive(Default, Clone, Copy)]
pub struct ItemStatusAppearance {
pub background: Option<Background>,
pub first: ItemAppearance,
pub middle: ItemAppearance,
pub last: ItemAppearance,
pub text_color: Color,
}
pub trait StyleSheet {
type Style: Default;
fn horizontal(&self, style: &Self::Style) -> Appearance;
fn vertical(&self, style: &Self::Style) -> Appearance;
}