chore(widget): set Button width and height with impl Into
This commit is contained in:
parent
9ceda6d704
commit
78647db0ea
2 changed files with 2 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue