pub type IconButton<'a, Message> = Builder<'a, Message, Icon>;
Aliased Type§
struct IconButton<'a, Message> { /* private fields */ }
Implementations§
source§impl<'a, Message> Button<'a, Message>
impl<'a, Message> Button<'a, Message>
pub fn new(icon: Icon) -> Self
sourcepub fn extra_small(self) -> Self
pub fn extra_small(self) -> Self
Applies the Extra Small button size preset.
sourcepub fn extra_large(self) -> Self
pub fn extra_large(self) -> Self
Applies the Extra Large button size preset.
pub fn selected(self, selected: bool) -> Self
pub fn vertical(self, vertical: bool) -> Self
source§impl<'a, Message, Variant> Builder<'a, Message, Variant>
impl<'a, Message, Variant> Builder<'a, Message, Variant>
sourcepub fn on_press_maybe(self, on_press: Option<Message>) -> Self
pub fn on_press_maybe(self, on_press: Option<Message>) -> Self
Set the value of [on_press
] as either Some
or None
.
source§impl<'a, Message, Variant> Builder<'a, Message, Variant>
impl<'a, Message, Variant> Builder<'a, Message, Variant>
sourcepub fn label(self, value: impl Into<Cow<'a, str>>) -> Self
pub fn label(self, value: impl Into<Cow<'a, str>>) -> Self
The label to display within the button.
pub fn tooltip(self, value: impl Into<Cow<'a, str>>) -> Self
sourcepub fn on_press(self, value: Message) -> Self
pub fn on_press(self, value: Message) -> Self
Sets the message that will be produced when the button is pressed.
If None
, the button will be disabled.
sourcepub fn padding(self, value: impl Into<Padding>) -> Self
pub fn padding(self, value: impl Into<Padding>) -> Self
Sets the preferred padding of the button.
sourcepub fn spacing(self, value: u16) -> Self
pub fn spacing(self, value: u16) -> Self
Sets the preferred spacing between elements in the button.
sourcepub fn line_height(self, value: u16) -> Self
pub fn line_height(self, value: u16) -> Self
Sets the prefered font line height.
sourcepub fn font_weight(self, value: Weight) -> Self
pub fn font_weight(self, value: Weight) -> Self
Sets the preferred font weight.
sourcepub fn class(self, value: ButtonClass) -> Self
pub fn class(self, value: ButtonClass) -> Self
The preferred style of the button.