pub struct MenuStyle {
pub background_color: Option<Color32>,
pub shadow_color: Option<Color32>,
pub surface_tint_color: Option<Color32>,
pub elevation: Option<f32>,
pub padding: Option<f32>,
pub min_width: Option<f32>,
pub max_width: Option<f32>,
pub corner_radius: Option<f32>,
}Expand description
The visual properties that menus have in common.
Based on Flutter’s MenuStyle. Controls the appearance of menus
created by MaterialMenu. Properties that are None use Material
Design 3 defaults.
§M3 Defaults
background_color:surfaceContainershadow_color:shadowelevation:3.0padding:8.0(vertical)corner_radius:4.0min_width:112.0max_width:280.0
Fields§
§background_color: Option<Color32>The menu’s background fill color.
shadow_color: Option<Color32>The shadow color of the menu’s surface.
surface_tint_color: Option<Color32>The surface tint color of the menu.
elevation: Option<f32>The elevation of the menu (affects shadow size).
padding: Option<f32>The vertical padding inside the menu.
min_width: Option<f32>The minimum width of the menu.
max_width: Option<f32>The maximum width of the menu.
corner_radius: Option<f32>The corner radius of the menu shape.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MenuStyle
impl RefUnwindSafe for MenuStyle
impl Send for MenuStyle
impl Sync for MenuStyle
impl Unpin for MenuStyle
impl UnsafeUnpin for MenuStyle
impl UnwindSafe for MenuStyle
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.