pub enum MarginStyle {
None,
Inner,
Tiny,
Small,
Large,
Huge,
Text,
Px(f32),
Em(f32),
}Expand description
Margin size
Default value: MarginStyle::Large.
Variants§
None
No margins
Inner
Inner margin, used to draw highlight/selection boxes
Guide size: 1px at 100%, 2px at 125%, 2px at 150%, 3px at 200%.
This is the smallest of the fixed margin sizes, and only really useful to reserve space for drawing selection boxes.
Tiny
A small margin for inner layout
Guide size: 2px at 100%, 3px at 125%, 4px at 150%, 5px at 200%.
Small
Small external margin size
Guide size: 4px at 100%, 5px at 125%, 7px at 150%, 9px at 200%.
Large
Large margin, used between elements such as buttons
Guide size: 7px at 100%, 9px at 125%, 11px at 150%, 15px at 200%.
Huge
Huge margin, used between things like file icons
Guide size: 15px at 100%.
Text
Text margins
Margins for use around standard text elements (may be asymmetric).
Px(f32)
Specify in pixels (scaled)
Em(f32)
Specify in Em (font size)
Trait Implementations§
Source§impl Clone for MarginStyle
impl Clone for MarginStyle
Source§fn clone(&self) -> MarginStyle
fn clone(&self) -> MarginStyle
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MarginStyle
impl Debug for MarginStyle
Source§impl Default for MarginStyle
impl Default for MarginStyle
Source§impl PartialEq for MarginStyle
impl PartialEq for MarginStyle
impl Copy for MarginStyle
impl StructuralPartialEq for MarginStyle
Auto Trait Implementations§
impl Freeze for MarginStyle
impl RefUnwindSafe for MarginStyle
impl Send for MarginStyle
impl Sync for MarginStyle
impl Unpin for MarginStyle
impl UnwindSafe for MarginStyle
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
Source§impl<S, T> CastApprox<T> for Swhere
T: ConvApprox<S>,
impl<S, T> CastApprox<T> for Swhere
T: ConvApprox<S>,
Source§fn try_cast_approx(self) -> Result<T, Error>
fn try_cast_approx(self) -> Result<T, Error>
Source§fn cast_approx(self) -> T
fn cast_approx(self) -> T
Source§impl<S, T> CastFloat<T> for Swhere
T: ConvFloat<S>,
impl<S, T> CastFloat<T> for Swhere
T: ConvFloat<S>,
Source§fn cast_trunc(self) -> T
fn cast_trunc(self) -> T
Source§fn cast_nearest(self) -> T
fn cast_nearest(self) -> T
Source§fn cast_floor(self) -> T
fn cast_floor(self) -> T
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>
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>
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)
&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)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.