refactor: make all members of the ThemeBuilder public

This commit is contained in:
Ashley Wulber 2023-10-05 11:11:37 -04:00
parent fd7ddf7ff5
commit d12feca78e
No known key found for this signature in database
GPG key ID: 5216D4F46A90A820

View file

@ -458,20 +458,34 @@ where
} }
/// Helper for building customized themes /// Helper for building customized themes
#[derive(Debug, Serialize, Deserialize, cosmic_config::cosmic_config_derive::CosmicConfigEntry)] #[derive(
Clone, Debug, Serialize, Deserialize, cosmic_config::cosmic_config_derive::CosmicConfigEntry,
)]
pub struct ThemeBuilder { pub struct ThemeBuilder {
palette: CosmicPalette<Srgba>, /// override the palette for the builder
spacing: Spacing, pub palette: CosmicPalette<Srgba>,
corner_radii: CornerRadii, /// override spacing for the builder
neutral_tint: Option<Srgb>, pub spacing: Spacing,
bg_color: Option<Srgba>, /// override corner radii for the builder
primary_container_bg: Option<Srgba>, pub corner_radii: CornerRadii,
secondary_container_bg: Option<Srgba>, /// override neutral_tint for the builder
text_tint: Option<Srgb>, pub neutral_tint: Option<Srgb>,
accent: Option<Srgb>, /// override bg_color for the builder
success: Option<Srgb>, pub bg_color: Option<Srgba>,
warning: Option<Srgb>, /// override the primary container bg color for the builder
destructive: Option<Srgb>, pub primary_container_bg: Option<Srgba>,
/// override the secontary container bg color for the builder
pub secondary_container_bg: Option<Srgba>,
/// override the text tint for the builder
pub text_tint: Option<Srgb>,
/// override the accent color for the builder
pub accent: Option<Srgb>,
/// override the success color for the builder
pub success: Option<Srgb>,
/// override the warning color for the builder
pub warning: Option<Srgb>,
/// override the destructive color for the builder
pub destructive: Option<Srgb>,
} }
impl Default for ThemeBuilder { impl Default for ThemeBuilder {