pub trait ButtonTheme {
fn button_bg_normal(&self) -> &str;
fn button_bg_hover(&self) -> &str;
fn button_bg_pressed(&self) -> &str;
fn button_bg_active(&self) -> &str;
fn button_bg_disabled(&self) -> &str;
fn button_text_normal(&self) -> &str;
fn button_text_hover(&self) -> &str;
fn button_text_active(&self) -> &str;
fn button_text_disabled(&self) -> &str;
fn button_icon_normal(&self) -> &str;
fn button_icon_hover(&self) -> &str;
fn button_icon_active(&self) -> &str;
fn button_icon_disabled(&self) -> &str;
fn button_border_normal(&self) -> &str;
fn button_border_hover(&self) -> &str;
fn button_border_focused(&self) -> &str;
fn button_accent(&self) -> &str;
fn button_danger(&self) -> &str;
fn button_success(&self) -> &str;
fn button_warning(&self) -> &str;
fn toolbar_item_bg_hover(&self) -> &str;
fn toolbar_item_bg_active(&self) -> &str;
fn toolbar_item_text(&self) -> &str;
fn toolbar_item_text_hover(&self) -> &str;
fn toolbar_item_text_active(&self) -> &str;
fn toolbar_separator(&self) -> &str;
fn toolbar_background(&self) -> &str;
fn toolbar_accent(&self) -> &str;
fn toolbar_label_text(&self) -> &str {
self.toolbar_item_text()
}
fn clock_text(&self) -> &str {
self.toolbar_item_text()
}
fn button_primary_bg(&self) -> &str;
fn button_primary_bg_hover(&self) -> &str;
fn button_danger_bg(&self) -> &str;
fn button_danger_bg_hover(&self) -> &str;
fn button_danger_border(&self) -> &str;
fn button_danger_border_hover(&self) -> &str;
fn button_danger_text(&self) -> &str;
fn button_secondary_hover_bg(&self) -> &str;
fn button_secondary_text_muted(&self) -> &str;
fn button_secondary_text(&self) -> &str;
fn button_ghost_idle_bg(&self) -> &str;
fn button_utility_bg(&self) -> &str;
fn button_utility_bg_hover(&self) -> &str;
fn color_swatch_border(&self) -> &str {
self.toolbar_separator()
}
fn color_swatch_hover_outline(&self) -> &str {
self.toolbar_item_bg_hover()
}
fn color_swatch_selected_border(&self) -> &str {
self.toolbar_accent()
}
fn transparency_checker_a(&self) -> &str {
"#ffffff"
}
fn transparency_checker_b(&self) -> &str {
"#cccccc"
}
fn fill_toggle_active_border(&self) -> &str {
self.toolbar_item_bg_active()
}
fn fill_toggle_off_pattern_color(&self) -> &str {
self.toolbar_separator()
}
fn dropdown_field_bg(&self) -> &str {
self.toolbar_background()
}
fn dropdown_field_bg_hover(&self) -> &str {
self.toolbar_item_bg_hover()
}
fn dropdown_field_border(&self) -> &str {
self.toolbar_separator()
}
fn dropdown_field_text(&self) -> &str {
self.toolbar_item_text()
}
fn dropdown_menu_row_bg_normal(&self) -> &str {
"transparent"
}
fn dropdown_menu_row_bg_hover(&self) -> &str {
self.toolbar_item_bg_hover()
}
fn dropdown_menu_row_bg_selected(&self) -> &str {
self.toolbar_item_bg_active()
}
fn dropdown_menu_row_text(&self) -> &str {
self.toolbar_item_text()
}
fn dropdown_menu_row_text_selected(&self) -> &str {
self.toolbar_item_text_active()
}
fn dropdown_menu_separator(&self) -> &str {
self.toolbar_separator()
}
fn dropdown_chevron_color(&self) -> &str {
self.toolbar_item_text()
}
fn selector_idle_border(&self) -> &str {
self.toolbar_separator()
}
fn selector_selected_border(&self) -> &str {
self.toolbar_accent()
}
fn selector_hover_border(&self) -> &str {
self.toolbar_item_bg_hover()
}
fn selector_label_text(&self) -> &str {
self.toolbar_item_text()
}
fn close_button_x_color(&self) -> &str {
self.toolbar_item_text()
}
fn close_button_x_color_hover(&self) -> &str {
self.toolbar_item_text_hover()
}
fn scroll_chevron_color(&self) -> &str {
self.toolbar_item_text()
}
fn scroll_chevron_color_hover(&self) -> &str {
self.toolbar_item_text_hover()
}
fn scroll_chevron_color_disabled(&self) -> &str {
self.button_text_disabled()
}
}
pub struct DefaultButtonTheme;
impl DefaultButtonTheme {
pub fn new() -> Self {
Self
}
}
impl Default for DefaultButtonTheme {
fn default() -> Self {
Self::new()
}
}
impl ButtonTheme for DefaultButtonTheme {
fn button_bg_normal(&self) -> &str { "transparent" }
fn button_bg_hover(&self) -> &str { "#2a2a2a" }
fn button_bg_pressed(&self) -> &str { "#1e3a5f" }
fn button_bg_active(&self) -> &str { "#1e3a5f" }
fn button_bg_disabled(&self) -> &str { "#2a2a2a" }
fn button_text_normal(&self) -> &str { "#d1d5db" }
fn button_text_hover(&self) -> &str { "#ffffff" }
fn button_text_active(&self) -> &str { "#ffffff" }
fn button_text_disabled(&self) -> &str { "#4a4a4a" }
fn button_icon_normal(&self) -> &str { "#787b86" }
fn button_icon_hover(&self) -> &str { "#e5e7eb" }
fn button_icon_active(&self) -> &str { "#ffffff" }
fn button_icon_disabled(&self) -> &str { "#4a4a4a" }
fn button_border_normal(&self) -> &str { "#3a3a3a" }
fn button_border_hover(&self) -> &str { "#e5e7eb" }
fn button_border_focused(&self) -> &str { "#2962ff" }
fn button_accent(&self) -> &str { "#2962ff" }
fn button_danger(&self) -> &str { "#ef5350" }
fn button_success(&self) -> &str { "#10b981" }
fn button_warning(&self) -> &str { "#f59e0b" }
fn toolbar_item_bg_hover(&self) -> &str { "#2a2e39" }
fn toolbar_item_bg_active(&self) -> &str { "#2196F3" }
fn toolbar_item_text(&self) -> &str { "#d1d4dc" }
fn toolbar_item_text_hover(&self) -> &str { "#ffffff" }
fn toolbar_item_text_active(&self) -> &str{ "#ffffff" }
fn toolbar_separator(&self) -> &str { "#2a2e39" }
fn toolbar_background(&self) -> &str { "#1e222d" }
fn toolbar_accent(&self) -> &str { "#2962ff" }
fn button_primary_bg(&self) -> &str { "#2962ff" }
fn button_primary_bg_hover(&self) -> &str { "#4080ff" }
fn button_danger_bg(&self) -> &str { "rgba(255,80,80,0.15)" }
fn button_danger_bg_hover(&self) -> &str { "rgba(255,80,80,0.35)" }
fn button_danger_border(&self) -> &str { "rgba(239,83,80,0.5)" }
fn button_danger_border_hover(&self) -> &str { "rgba(239,83,80,0.75)" }
fn button_danger_text(&self) -> &str { "#ef5350" }
fn button_secondary_hover_bg(&self) -> &str { "rgba(255,255,255,0.12)" }
fn button_secondary_text_muted(&self) -> &str { "rgba(254,255,238,0.7)" }
fn button_secondary_text(&self) -> &str { "rgba(254,255,238,0.95)" }
fn button_ghost_idle_bg(&self) -> &str { "#1e222d" }
fn button_utility_bg(&self) -> &str { "#2a2e39" }
fn button_utility_bg_hover(&self) -> &str { "#363a45" }
}