pub struct WidgetStyle {
pub meter_height: f32,
pub meter_width: Option<f32>,
pub radius: u8,
pub token_padding: Vec2,
pub figure_gap: f32,
pub figure_scale: f32,
}Expand description
The sizes a widget cannot derive from the description.
Every number a caller might reasonably want different, in one place, on the
footing FrameStyle and FieldStyle
already establish: this crate owns no sizes.
Fields§
§meter_height: f32How tall a meter’s bar is drawn.
meter_width: Option<f32>How wide a meter’s bar runs, or None to take the width on offer.
None is the honest default in immediate mode: a bar in a side panel and
a bar in a wide pane are the same description, and the available width is
the only thing either of them knows.
radius: u8The corner radius on a meter’s trough and on a token.
token_padding: Vec2Inside a token, around its label.
figure_gap: f32Between a figure’s value and its caption.
figure_scale: f32How much larger a figure’s value is drawn than the body text.
A multiplier rather than a size, so a figure scales with whatever text style the app has set rather than pinning a point size this crate has no business choosing.
Trait Implementations§
Source§impl Clone for WidgetStyle
impl Clone for WidgetStyle
Source§fn clone(&self) -> WidgetStyle
fn clone(&self) -> WidgetStyle
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for WidgetStyle
Source§impl Debug for WidgetStyle
impl Debug for WidgetStyle
Source§impl Default for WidgetStyle
impl Default for WidgetStyle
Source§impl PartialEq for WidgetStyle
impl PartialEq for WidgetStyle
impl StructuralPartialEq for WidgetStyle
Auto Trait Implementations§
impl Freeze for WidgetStyle
impl RefUnwindSafe for WidgetStyle
impl Send for WidgetStyle
impl Sync for WidgetStyle
impl Unpin for WidgetStyle
impl UnsafeUnpin for WidgetStyle
impl UnwindSafe for WidgetStyle
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more