#[derive(Debug, Clone)]
pub enum BackgroundFill {
Solid,
Glass {
blur_radius: f64,
},
Texture {
asset_id: &'static str,
},
}
pub trait PopupStyle {
fn radius(&self) -> f64;
fn border_width(&self) -> f64;
fn padding(&self) -> f64;
fn shadow_offset(&self) -> (f64, f64);
fn swatch_size(&self) -> f64;
fn grid_gap(&self) -> f64;
fn swatch_radius(&self) -> f64;
fn grid_columns(&self) -> usize;
fn opacity_row_height(&self) -> f64;
fn hsv_square_size(&self) -> f64;
fn hue_bar_width(&self) -> f64;
fn hex_row_height(&self) -> f64;
fn action_button_height(&self) -> f64;
fn hsv_inner_gap(&self) -> f64;
fn swatch_grid_size(&self) -> f64;
fn swatch_grid_gap(&self) -> f64;
fn swatch_grid_columns(&self) -> usize;
fn remove_row_height(&self) -> f64;
fn item_height(&self) -> f64;
fn separator_height(&self) -> f64;
fn header_height(&self) -> f64;
fn min_width(&self) -> f64;
fn strip_row_height(&self) -> f64;
fn strip_row_gap(&self) -> f64;
fn strip_icon_size(&self) -> f64;
fn background_fill(&self) -> BackgroundFill {
BackgroundFill::Solid
}
}
#[derive(Default)]
pub struct DefaultPopupStyle;
impl PopupStyle for DefaultPopupStyle {
fn radius(&self) -> f64 { 4.0 }
fn border_width(&self) -> f64 { 1.0 }
fn padding(&self) -> f64 { 8.0 }
fn shadow_offset(&self) -> (f64, f64) { (2.0, 4.0) }
fn swatch_size(&self) -> f64 { 18.0 }
fn grid_gap(&self) -> f64 { 2.0 }
fn swatch_radius(&self) -> f64 { 2.0 }
fn grid_columns(&self) -> usize { 10 }
fn opacity_row_height(&self)-> f64 { 24.0 }
fn hsv_square_size(&self) -> f64 { 180.0 }
fn hue_bar_width(&self) -> f64 { 20.0 }
fn hex_row_height(&self) -> f64 { 32.0 }
fn action_button_height(&self) -> f64 { 28.0 }
fn hsv_inner_gap(&self) -> f64 { 8.0 }
fn swatch_grid_size(&self) -> f64 { 20.0 }
fn swatch_grid_gap(&self) -> f64 { 3.0 }
fn swatch_grid_columns(&self) -> usize { 4 }
fn remove_row_height(&self) -> f64 { 22.0 }
fn item_height(&self) -> f64 { 32.0 }
fn separator_height(&self)-> f64 { 9.0 }
fn header_height(&self) -> f64 { 28.0 }
fn min_width(&self) -> f64 { 180.0 }
fn strip_row_height(&self) -> f64 { 20.0 }
fn strip_row_gap(&self) -> f64 { 2.0 }
fn strip_icon_size(&self) -> f64 { 14.0 }
}