chore(widget): set Button width and height with impl Into

This commit is contained in:
Michael Aaron Murphy 2023-09-19 16:39:25 +02:00 committed by Michael Murphy
parent 9ceda6d704
commit 78647db0ea
2 changed files with 2 additions and 2 deletions

View file

@ -162,8 +162,6 @@ impl<'a, Message: Clone + 'static> From<Button<'a, Message>> for Element<'a, Mes
let button = if builder.variant.vertical {
crate::widget::column::with_children(content)
.padding(builder.padding)
// .width(builder.width)
// .height(builder.height)
.spacing(builder.spacing)
.align_items(Alignment::Center)
.apply(button)

View file

@ -55,9 +55,11 @@ pub struct Builder<'a, Message, Variant> {
on_press: Option<Message>,
/// Sets the preferred width of the button.
#[setters(into)]
width: Length,
/// Sets the preferred height of the button.
#[setters(into)]
height: Length,
/// Sets the preferred padding of the button.