fix: spin button styling & spacing
This commit is contained in:
parent
f3206b1620
commit
2a628b8431
3 changed files with 21 additions and 23 deletions
|
|
@ -46,42 +46,40 @@ impl<'a, Message: 'static> SpinButton<'a, Message> {
|
|||
icon("list-remove-symbolic", 24)
|
||||
.style(theme::Svg::Symbolic)
|
||||
.apply(container)
|
||||
.width(Length::Fill)
|
||||
.height(Length::Fill)
|
||||
.width(Length::Fixed(32.0))
|
||||
.height(Length::Fixed(32.0))
|
||||
.align_x(Horizontal::Center)
|
||||
.align_y(Vertical::Center)
|
||||
.apply(button)
|
||||
.width(Length::Fill)
|
||||
.height(Length::Fill)
|
||||
.width(Length::Fixed(32.0))
|
||||
.height(Length::Fixed(32.0))
|
||||
.style(theme::Button::Text)
|
||||
.on_press(model::Message::Decrement),
|
||||
text(label)
|
||||
.vertical_alignment(Vertical::Center)
|
||||
.apply(container)
|
||||
.width(Length::Fill)
|
||||
.height(Length::Fill)
|
||||
.align_x(Horizontal::Center)
|
||||
.align_y(Vertical::Center),
|
||||
icon("list-add-symbolic", 24)
|
||||
.style(theme::Svg::Symbolic)
|
||||
.apply(container)
|
||||
.width(Length::Fill)
|
||||
.height(Length::Fill)
|
||||
.width(Length::Fixed(32.0))
|
||||
.height(Length::Fixed(32.0))
|
||||
.align_x(Horizontal::Center)
|
||||
.align_y(Vertical::Center)
|
||||
.apply(button)
|
||||
.width(Length::Fill)
|
||||
.height(Length::Fill)
|
||||
.width(Length::Fixed(32.0))
|
||||
.height(Length::Fixed(32.0))
|
||||
.style(theme::Button::Text)
|
||||
.on_press(model::Message::Increment),
|
||||
]
|
||||
.width(Length::Fill)
|
||||
.width(Length::Shrink)
|
||||
.height(Length::Fixed(32.0))
|
||||
.spacing(4.0)
|
||||
.align_items(Alignment::Center),
|
||||
)
|
||||
.padding([4, 4])
|
||||
.align_y(Vertical::Center)
|
||||
.width(Length::Fixed(95.0))
|
||||
.width(Length::Shrink)
|
||||
.height(Length::Fixed(32.0))
|
||||
.style(theme::Container::custom(container_style))
|
||||
.apply(Element::from)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue