Skip to main content

ButtonGroupDefaults

Struct ButtonGroupDefaults 

Source
pub struct ButtonGroupDefaults;
Expand description

Compose’s ButtonGroupDefaults: the spacing and shapes a group uses.

Implementations§

Source§

impl ButtonGroupDefaults

Source

pub const EXPANDED_RATIO: f64 = 0.15

The fraction of the pressed button’s width a press is allowed to add.

The group does not expand a pressed button (PORTING.md); this is the value Compose would use.

Source

pub const BETWEEN_SPACE: f64 = 12.0

The default spacing between the buttons of a standard group.

Source

pub const CONNECTED_SPACE_BETWEEN: f64 = 2.0

The default spacing between the buttons of a connected group.

Source

pub fn connected_leading_button_shapes_for( button_height: f64, ) -> (OutlinedBorderRef, OutlinedBorderRef, OutlinedBorderRef)

The shapes of the first button of a connected group at button_height.

Source

pub fn connected_middle_button_shapes_for( button_height: f64, ) -> (OutlinedBorderRef, OutlinedBorderRef, OutlinedBorderRef)

The shapes of a middle button of a connected group at button_height.

Source

pub fn connected_trailing_button_shapes_for( button_height: f64, ) -> (OutlinedBorderRef, OutlinedBorderRef, OutlinedBorderRef)

The shapes of the last button of a connected group at button_height.

Source

pub fn connected_leading_button_shapes() -> (OutlinedBorderRef, OutlinedBorderRef, OutlinedBorderRef)

The three shapes of the first button of a connected group of small buttons.

Source

pub fn connected_middle_button_shapes() -> (OutlinedBorderRef, OutlinedBorderRef, OutlinedBorderRef)

The three shapes of a middle button of a connected group of small buttons.

Source

pub fn connected_trailing_button_shapes() -> (OutlinedBorderRef, OutlinedBorderRef, OutlinedBorderRef)

The three shapes of the last button of a connected group of small buttons.

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,