pub struct Theme {
pub colors: ColorPalette,
pub spacing: Spacing,
pub typography: Typography,
}Expand description
Complete theme with colors and spacing
§Example
use armas_basic::Theme;
let theme = Theme::dark();
let bg = theme.background();
let fg = theme.foreground();
let primary = theme.primary();Fields§
§colors: ColorPaletteColor palette
spacing: SpacingSpacing configuration
typography: TypographyTypography / font size scale
Implementations§
Source§impl Theme
impl Theme
Sourcepub const fn background(&self) -> Color32
pub const fn background(&self) -> Color32
Background color
Sourcepub const fn foreground(&self) -> Color32
pub const fn foreground(&self) -> Color32
Foreground/text color
Sourcepub const fn card_foreground(&self) -> Color32
pub const fn card_foreground(&self) -> Color32
Card foreground color
Sourcepub const fn popover_foreground(&self) -> Color32
pub const fn popover_foreground(&self) -> Color32
Popover foreground color
Sourcepub const fn primary_foreground(&self) -> Color32
pub const fn primary_foreground(&self) -> Color32
Primary foreground color
Sourcepub const fn secondary_foreground(&self) -> Color32
pub const fn secondary_foreground(&self) -> Color32
Secondary foreground color
Sourcepub const fn muted_foreground(&self) -> Color32
pub const fn muted_foreground(&self) -> Color32
Muted foreground color
Sourcepub const fn accent_foreground(&self) -> Color32
pub const fn accent_foreground(&self) -> Color32
Accent foreground color
Sourcepub const fn destructive(&self) -> Color32
pub const fn destructive(&self) -> Color32
Destructive/error color
Sourcepub const fn destructive_foreground(&self) -> Color32
pub const fn destructive_foreground(&self) -> Color32
Destructive foreground color
Sidebar background color
Sidebar foreground/text color
Sidebar primary color
Sidebar primary foreground color
Sidebar accent color (hover/active background)
Sidebar accent foreground color
Sidebar border color
Sidebar focus ring color
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Theme
impl<'de> Deserialize<'de> for Theme
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Theme
impl RefUnwindSafe for Theme
impl Send for Theme
impl Sync for Theme
impl Unpin for Theme
impl UnsafeUnpin for Theme
impl UnwindSafe for Theme
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more