use super::ColorQuad;
use super::PinShape;
#[derive(Debug, Clone, PartialEq)]
pub struct PinStyle {
pub color: ColorQuad,
pub radius: f32,
pub shape: PinShape,
pub cutout_radius: f32,
pub border_color: ColorQuad,
pub border_width: f32,
}
#[cfg(test)]
mod tests {
use super::*;
use iced_widget::core::Theme;
#[test]
fn the_cutout_is_not_derived_from_the_indicator() {
use crate::style::{PinStatus, default_pin_style};
let base = default_pin_style(&Theme::Dark, PinStatus::Idle);
let bigger = PinStyle {
radius: base.radius * 3.0,
..base.clone()
};
assert_eq!(bigger.cutout_radius, base.cutout_radius);
}
}