pub struct Stylesheet {Show 13 fields
pub width: Size,
pub height: Size,
pub background: Background,
pub padding: Rectangle,
pub margin: Rectangle,
pub color: Color,
pub font: Font,
pub text_size: f32,
pub text_wrap: TextWrap,
pub direction: Direction,
pub align_horizontal: Align,
pub align_vertical: Align,
pub flags: Vec<String>,
}Expand description
A fully resolved stylesheet, passed by reference to Widget::draw.
Contains the resolved values of all possible style properties.
Fields§
§width: SizeWidget width
height: SizeWidget height
background: BackgroundBackground for the widget that full covers the layout rect
padding: RectangleAmount of padding to use on each side of the content
margin: RectangleSize of the margin on each side of the widget
color: ColorColor to use for foreground drawing, including text
font: FontFont to use for text rendering
text_size: f32Size of text
text_wrap: TextWrapWrapping strategy for text
direction: DirectionLayout direction for widgets that support it (atm not text unfortunately..)
align_horizontal: AlignHow to align children horizontally
align_vertical: AlignHow to align children vertically
flags: Vec<String>Flags
Implementations§
Trait Implementations§
Source§impl Clone for Stylesheet
impl Clone for Stylesheet
Source§fn clone(&self) -> Stylesheet
fn clone(&self) -> Stylesheet
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for Stylesheet
impl RefUnwindSafe for Stylesheet
impl Send for Stylesheet
impl Sync for Stylesheet
impl Unpin for Stylesheet
impl UnwindSafe for Stylesheet
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