pub trait PopupTheme {
fn popup_padding(&self) -> f64;
fn background_color(&self) -> [u8; 4];
fn border_color(&self) -> [u8; 4];
fn shadow_blur(&self) -> f64;
fn shadow_offset(&self) -> (f64, f64);
fn shadow_color(&self) -> [u8; 4];
fn menu_min_width(&self) -> f64;
fn menu_item_height(&self) -> f64;
fn menu_icon_size(&self) -> f64;
fn menu_separator_height(&self) -> f64;
fn menu_padding_horizontal(&self) -> f64;
fn menu_padding_vertical(&self) -> f64;
fn menu_hover_color(&self) -> [u8; 4];
fn menu_text_color(&self) -> [u8; 4];
fn menu_icon_color(&self) -> [u8; 4];
fn color_swatch_size(&self) -> f64;
fn color_grid_spacing(&self) -> f64;
fn hex_input_height(&self) -> f64;
fn color_selection_border(&self) -> [u8; 4];
}
pub struct DefaultPopupTheme;
impl DefaultPopupTheme {
pub fn new() -> Self {
Self
}
}
impl Default for DefaultPopupTheme {
fn default() -> Self {
Self::new()
}
}
impl PopupTheme for DefaultPopupTheme {
fn popup_padding(&self) -> f64 { 8.0 }
fn background_color(&self) -> [u8; 4] { [40, 40, 40, 255] }
fn border_color(&self) -> [u8; 4] { [80, 80, 80, 255] }
fn shadow_blur(&self) -> f64 { 8.0 }
fn shadow_offset(&self) -> (f64, f64) { (0.0, 4.0) }
fn shadow_color(&self) -> [u8; 4] { [0, 0, 0, 128] }
fn menu_min_width(&self) -> f64 { 180.0 }
fn menu_item_height(&self) -> f64 { 32.0 }
fn menu_icon_size(&self) -> f64 { 16.0 }
fn menu_separator_height(&self) -> f64 { 9.0 }
fn menu_padding_horizontal(&self) -> f64 { 12.0 }
fn menu_padding_vertical(&self) -> f64 { 8.0 }
fn menu_hover_color(&self) -> [u8; 4] { [60, 60, 60, 255] }
fn menu_text_color(&self) -> [u8; 4] { [255, 255, 255, 255] }
fn menu_icon_color(&self) -> [u8; 4] { [180, 180, 180, 255] }
fn color_swatch_size(&self) -> f64 { 24.0 }
fn color_grid_spacing(&self) -> f64 { 4.0 }
fn hex_input_height(&self) -> f64 { 30.0 }
fn color_selection_border(&self) -> [u8; 4] { [255, 255, 255, 255] }
}