#[non_exhaustive]pub struct Theme {}Expand description
Colors and sizes widgets share, so an application restyles every widget in one place. Sizes are in logical pixels.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.background: ColorBehind everything: the window.
surface: ColorPanels and toolbars.
raised: ColorControls: buttons, inputs.
hover: ColorA control under the pointer.
pressed: ColorA control being pressed.
border: ColorLines between and around things.
text: ColorText.
text_dim: ColorSecondary text: hints, labels of lesser weight.
accent: ColorThe accent: default buttons, selected items.
on_accent: ColorText on the accent color.
selection: ColorSelected text’s background.
focus: ColorThe ring around the focused control.
font_size: f32Body text size.
spacing: f32The base unit of spacing.
Implementations§
Trait Implementations§
Source§impl Default for Theme
impl Default for Theme
Source§fn default() -> Self
fn default() -> Self
Theme::dark: data-dense screens are mostly read in dark rooms.
impl StructuralPartialEq for Theme
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