Struct Radii
pub struct Radii {
pub tile: f32,
pub panel: f32,
pub control: f32,
pub item: f32,
pub detail: f32,
pub full: f32,
}Fields§
§tile: f32A window tile.
panel: f32A floating panel: menu, popover, palette, sheet, quick settings.
control: f32A control: button, field, segmented track, a quick-settings tile.
item: f32An item inside a control or a list: a selected row, a segment thumb.
detail: f32The smallest corner anything gets: a progress track, a badge, a sparkline clip, a caret. Also the concentric floor.
full: f32A pill: chips, presence pills, tags, avatars — things pill-shaped by meaning. Buttons and tabs are not pills. A “make it a pill” sentinel, not a real length; drawing code clamps it to half the short side.
Implementations§
§impl Radii
impl Radii
pub const MIN: f32 = 4.0
pub const MIN: f32 = 4.0
The concentric floor at 1×: no corner inside a container shrinks below this.
pub fn from_window_radius(window: f32) -> Radii
pub fn from_window_radius(window: f32) -> Radii
The whole scale from a theme’s one shape role, the window tile’s radius. At the stock 14 it is the design language’s table (panel 18, control 8, item 6, detail 4); every other radius keeps its proportion to the window, and the item stays concentric inside its control.
pub fn concentric(&self, outer: f32, inset: f32) -> f32
pub fn concentric(&self, outer: f32, inset: f32) -> f32
The radius of something inset inset inside a container whose
corner is outer: outer - inset, never below Self::detail.
A full-pill container yields a full pill.
Trait Implementations§
impl StructuralPartialEq for Radii
Auto Trait Implementations§
impl Freeze for Radii
impl RefUnwindSafe for Radii
impl Send for Radii
impl Sync for Radii
impl Unpin for Radii
impl UnsafeUnpin for Radii
impl UnwindSafe for Radii
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§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.§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.§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.§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.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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