Skip to main content

SplitButtonDefaults

Struct SplitButtonDefaults 

Source
pub struct SplitButtonDefaults;
Expand description

Compose’s SplitButtonDefaults: the token values, and the shapes, paddings and icon sizes chosen for a part’s height.

Implementations§

Source§

impl SplitButtonDefaults

Source

pub const SPACING: f64 = 2.0

The default spacing between a split button’s two parts.

Source

pub const EXTRA_SMALL_CONTAINER_HEIGHT: f64 = 32.0

The height of an extra small container.

Source

pub const SMALL_CONTAINER_HEIGHT: f64 = 40.0

The height of a small container, and the parts’ default minimum height.

Source

pub const MEDIUM_CONTAINER_HEIGHT: f64 = 56.0

The height of a medium container.

Source

pub const LARGE_CONTAINER_HEIGHT: f64 = 96.0

The height of a large container.

Source

pub const EXTRA_LARGE_CONTAINER_HEIGHT: f64 = 136.0

The height of an extra large container.

Source

pub const LEADING_ICON_SIZE: f64 = 20.0

The default size of the leading part’s icon at the small height.

Source

pub const TRAILING_ICON_SIZE: f64 = 22.0

The default size of the trailing part’s icon at the small height.

Source

pub fn leading_button_shapes_for(button_height: f64) -> SplitButtonShapes

The shapes of a leading part at button_height: the outer corners are full, and the inner ones follow the size’s resting and pressed inner corner.

Source

pub fn trailing_button_shapes_for(button_height: f64) -> SplitButtonShapes

The shapes of a trailing part at button_height.

Source

pub fn leading_button_content_padding_for( button_height: f64, ) -> EdgeInsetsGeometry

The content padding of a leading part at button_height.

Source

pub fn trailing_button_content_padding_for( button_height: f64, ) -> EdgeInsetsGeometry

The content padding of a trailing part at button_height.

Source

pub fn leading_button_icon_size_for(button_height: f64) -> f64

The size of a leading part’s icon at button_height.

Source

pub fn trailing_button_icon_size_for(button_height: f64) -> f64

The size of a trailing part’s icon at button_height.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,