pub trait ButtonStyle {
fn radius(&self) -> f64;
fn padding_x(&self) -> f64;
fn padding_y(&self) -> f64;
fn icon_size(&self) -> f64;
fn font_size(&self) -> f64;
fn gap(&self) -> f64;
fn border_width(&self) -> f64;
fn show_active_border(&self) -> bool;
}
pub struct DefaultButtonStyle;
impl Default for DefaultButtonStyle {
fn default() -> Self {
Self
}
}
impl ButtonStyle for DefaultButtonStyle {
fn radius(&self) -> f64 { 4.0 }
fn padding_x(&self) -> f64 { 8.0 }
fn padding_y(&self) -> f64 { 4.0 }
fn icon_size(&self) -> f64 { 16.0 }
fn font_size(&self) -> f64 { 13.0 }
fn gap(&self) -> f64 { 6.0 }
fn border_width(&self) -> f64 { 1.0 }
fn show_active_border(&self) -> bool { false }
}
pub struct CompactButtonStyle;
impl ButtonStyle for CompactButtonStyle {
fn radius(&self) -> f64 { 3.0 }
fn padding_x(&self) -> f64 { 4.0 }
fn padding_y(&self) -> f64 { 2.0 }
fn icon_size(&self) -> f64 { 12.0 }
fn font_size(&self) -> f64 { 11.0 }
fn gap(&self) -> f64 { 4.0 }
fn border_width(&self) -> f64 { 1.0 }
fn show_active_border(&self) -> bool { false }
}
pub struct FlatButtonStyle;
impl ButtonStyle for FlatButtonStyle {
fn radius(&self) -> f64 { 0.0 }
fn padding_x(&self) -> f64 { 12.0 }
fn padding_y(&self) -> f64 { 6.0 }
fn icon_size(&self) -> f64 { 16.0 }
fn font_size(&self) -> f64 { 13.0 }
fn gap(&self) -> f64 { 6.0 }
fn border_width(&self) -> f64 { 1.0 }
fn show_active_border(&self) -> bool { false }
}
pub struct ToolbarButtonStyle;
impl ButtonStyle for ToolbarButtonStyle {
fn radius(&self) -> f64 { 4.0 }
fn padding_x(&self) -> f64 { 0.0 }
fn padding_y(&self) -> f64 { 0.0 }
fn icon_size(&self) -> f64 { 16.0 }
fn font_size(&self) -> f64 { 13.0 }
fn gap(&self) -> f64 { 4.0 }
fn border_width(&self) -> f64 { 1.0 }
fn show_active_border(&self) -> bool { false }
}
pub struct ToolbarLabelStyle;
impl ButtonStyle for ToolbarLabelStyle {
fn radius(&self) -> f64 { 4.0 }
fn padding_x(&self) -> f64 { 4.0 }
fn padding_y(&self) -> f64 { 0.0 }
fn icon_size(&self) -> f64 { 16.0 }
fn font_size(&self) -> f64 { 11.0 }
fn gap(&self) -> f64 { 2.0 }
fn border_width(&self) -> f64 { 1.0 }
fn show_active_border(&self) -> bool { false }
}
pub struct PrimaryButtonStyle;
impl ButtonStyle for PrimaryButtonStyle {
fn radius(&self) -> f64 { 0.0 }
fn padding_x(&self) -> f64 { 12.0 }
fn padding_y(&self) -> f64 { 0.0 }
fn icon_size(&self) -> f64 { 16.0 }
fn font_size(&self) -> f64 { 12.0 }
fn gap(&self) -> f64 { 6.0 }
fn border_width(&self) -> f64 { 1.0 }
fn show_active_border(&self) -> bool { false }
}
pub struct PrimaryRoundedButtonStyle;
impl ButtonStyle for PrimaryRoundedButtonStyle {
fn radius(&self) -> f64 { 4.0 }
fn padding_x(&self) -> f64 { 12.0 }
fn padding_y(&self) -> f64 { 0.0 }
fn icon_size(&self) -> f64 { 16.0 }
fn font_size(&self) -> f64 { 12.0 }
fn gap(&self) -> f64 { 6.0 }
fn border_width(&self) -> f64 { 1.0 }
fn show_active_border(&self) -> bool { false }
}
pub struct GhostOutlineButtonStyle;
impl ButtonStyle for GhostOutlineButtonStyle {
fn radius(&self) -> f64 { 0.0 }
fn padding_x(&self) -> f64 { 12.0 }
fn padding_y(&self) -> f64 { 0.0 }
fn icon_size(&self) -> f64 { 16.0 }
fn font_size(&self) -> f64 { 13.0 }
fn gap(&self) -> f64 { 6.0 }
fn border_width(&self) -> f64 { 1.0 }
fn show_active_border(&self) -> bool { false }
}
pub struct GhostOutlineRoundedButtonStyle;
impl ButtonStyle for GhostOutlineRoundedButtonStyle {
fn radius(&self) -> f64 { 4.0 }
fn padding_x(&self) -> f64 { 12.0 }
fn padding_y(&self) -> f64 { 0.0 }
fn icon_size(&self) -> f64 { 16.0 }
fn font_size(&self) -> f64 { 13.0 }
fn gap(&self) -> f64 { 6.0 }
fn border_width(&self) -> f64 { 1.0 }
fn show_active_border(&self) -> bool { false }
}
pub struct DangerButtonStyle;
impl ButtonStyle for DangerButtonStyle {
fn radius(&self) -> f64 { 4.0 }
fn padding_x(&self) -> f64 { 10.0 }
fn padding_y(&self) -> f64 { 0.0 }
fn icon_size(&self) -> f64 { 14.0 }
fn font_size(&self) -> f64 { 11.0 }
fn gap(&self) -> f64 { 6.0 }
fn border_width(&self) -> f64 { 1.0 }
fn show_active_border(&self) -> bool { false }
}
pub struct SidebarTabStyle;
impl ButtonStyle for SidebarTabStyle {
fn radius(&self) -> f64 { 0.0 }
fn padding_x(&self) -> f64 { 0.0 }
fn padding_y(&self) -> f64 { 0.0 }
fn icon_size(&self) -> f64 { 20.0 }
fn font_size(&self) -> f64 { 13.0 }
fn gap(&self) -> f64 { 0.0 }
fn border_width(&self) -> f64 { 0.0 }
fn show_active_border(&self) -> bool { false }
}
pub struct HorizontalTabStyle;
impl ButtonStyle for HorizontalTabStyle {
fn radius(&self) -> f64 { 0.0 }
fn padding_x(&self) -> f64 { 12.0 }
fn padding_y(&self) -> f64 { 0.0 }
fn icon_size(&self) -> f64 { 16.0 }
fn font_size(&self) -> f64 { 12.0 }
fn gap(&self) -> f64 { 6.0 }
fn border_width(&self) -> f64 { 0.0 }
fn show_active_border(&self) -> bool { false }
}
pub struct UtilityButtonStyle;
impl ButtonStyle for UtilityButtonStyle {
fn radius(&self) -> f64 { 4.0 }
fn padding_x(&self) -> f64 { 10.0 }
fn padding_y(&self) -> f64 { 0.0 }
fn icon_size(&self) -> f64 { 16.0 }
fn font_size(&self) -> f64 { 11.0 }
fn gap(&self) -> f64 { 6.0 }
fn border_width(&self) -> f64 { 1.0 }
fn show_active_border(&self) -> bool { false }
}
pub trait DropdownMenuRowStyle {
fn radius(&self) -> f64;
fn highlight_inset_x(&self) -> f64;
fn text_padding_x(&self) -> f64;
fn font_size(&self) -> f64;
fn separator_height(&self) -> f64;
}
pub struct RoundedDropdownMenuRowStyle;
impl DropdownMenuRowStyle for RoundedDropdownMenuRowStyle {
fn radius(&self) -> f64 { 3.0 }
fn highlight_inset_x(&self) -> f64 { 1.0 }
fn text_padding_x(&self) -> f64 { 8.0 }
fn font_size(&self) -> f64 { 13.0 }
fn separator_height(&self) -> f64 { 1.0 }
}
pub struct FlatDropdownMenuRowStyle;
impl DropdownMenuRowStyle for FlatDropdownMenuRowStyle {
fn radius(&self) -> f64 { 0.0 }
fn highlight_inset_x(&self) -> f64 { 1.0 }
fn text_padding_x(&self) -> f64 { 8.0 }
fn font_size(&self) -> f64 { 13.0 }
fn separator_height(&self) -> f64 { 1.0 }
}