Struct material_egui::MaterialColors
source · pub struct MaterialColors {Show 51 fields
pub dark: bool,
pub base_color: String,
pub zoom: f32,
pub primary: Color32,
pub on_primary: Color32,
pub primary_container: Color32,
pub on_primary_container: Color32,
pub inverse_primary: Color32,
pub primary_fixed: Color32,
pub primary_fixed_dim: Color32,
pub on_primary_fixed: Color32,
pub on_primary_fixed_variant: Color32,
pub secondary: Color32,
pub on_secondary: Color32,
pub secondary_container: Color32,
pub on_secondary_container: Color32,
pub secondary_fixed: Color32,
pub secondary_fixed_dim: Color32,
pub on_secondary_fixed: Color32,
pub on_secondary_fixed_variant: Color32,
pub tertiary: Color32,
pub on_tertiary: Color32,
pub tertiary_container: Color32,
pub on_tertiary_container: Color32,
pub tertiary_fixed: Color32,
pub tertiary_fixed_dim: Color32,
pub on_tertiary_fixed: Color32,
pub on_tertiary_fixed_variant: Color32,
pub error: Color32,
pub on_error: Color32,
pub error_container: Color32,
pub on_error_container: Color32,
pub surface_dim: Color32,
pub surface: Color32,
pub surface_bright: Color32,
pub surface_container_lowest: Color32,
pub surface_container_low: Color32,
pub surface_container: Color32,
pub surface_container_high: Color32,
pub surface_container_highest: Color32,
pub on_surface: Color32,
pub on_surface_variant: Color32,
pub outline: Color32,
pub outline_variant: Color32,
pub inverse_surface: Color32,
pub inverse_on_surface: Color32,
pub surface_variant: Color32,
pub background: Color32,
pub on_background: Color32,
pub shadow: Color32,
pub scrim: Color32,
}
Fields§
§dark: bool
§base_color: String
§zoom: f32
§primary: Color32
§on_primary: Color32
§primary_container: Color32
§on_primary_container: Color32
§inverse_primary: Color32
§primary_fixed: Color32
§primary_fixed_dim: Color32
§on_primary_fixed: Color32
§on_primary_fixed_variant: Color32
§secondary: Color32
§on_secondary: Color32
§secondary_container: Color32
§on_secondary_container: Color32
§secondary_fixed: Color32
§secondary_fixed_dim: Color32
§on_secondary_fixed: Color32
§on_secondary_fixed_variant: Color32
§tertiary: Color32
§on_tertiary: Color32
§tertiary_container: Color32
§on_tertiary_container: Color32
§tertiary_fixed: Color32
§tertiary_fixed_dim: Color32
§on_tertiary_fixed: Color32
§on_tertiary_fixed_variant: Color32
§error: Color32
§on_error: Color32
§error_container: Color32
§on_error_container: Color32
§surface_dim: Color32
§surface: Color32
§surface_bright: Color32
§surface_container_lowest: Color32
§surface_container_low: Color32
§surface_container: Color32
§surface_container_high: Color32
§surface_container_highest: Color32
§on_surface: Color32
§on_surface_variant: Color32
§outline: Color32
§outline_variant: Color32
§inverse_surface: Color32
§inverse_on_surface: Color32
§surface_variant: Color32
§background: Color32
§on_background: Color32
§shadow: Color32
§scrim: Color32
Implementations§
source§impl MaterialColors
impl MaterialColors
pub fn rebuild(&mut self) -> Self
pub fn new(base_color: String, dark: bool, zoom: f32) -> Self
sourcepub fn export(&self) -> Style
pub fn export(&self) -> Style
exports the default M3 theme this function applies M3 themes to egui assets, specific implementation is subject to change CANNOT apply zoom
sourcepub fn apply_zoom(&mut self, ctx: &Context, first_run: &mut bool)
pub fn apply_zoom(&mut self, ctx: &Context, first_run: &mut bool)
applies generated theming values to ctx this also applies zoom value: must be stored persistently
pub fn error_apply(&self, ui: &mut Ui)
Trait Implementations§
source§impl Clone for MaterialColors
impl Clone for MaterialColors
source§fn clone(&self) -> MaterialColors
fn clone(&self) -> MaterialColors
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for MaterialColors
impl Debug for MaterialColors
source§impl Default for MaterialColors
impl Default for MaterialColors
source§fn default() -> MaterialColors
fn default() -> MaterialColors
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MaterialColors
impl RefUnwindSafe for MaterialColors
impl Send for MaterialColors
impl Sync for MaterialColors
impl Unpin for MaterialColors
impl UnwindSafe for MaterialColors
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