fix: spin button styling & spacing

This commit is contained in:
Ashley Wulber 2023-05-09 15:47:09 -04:00
parent f3206b1620
commit 2a628b8431
No known key found for this signature in database
GPG key ID: 5216D4F46A90A820
3 changed files with 21 additions and 23 deletions

View file

@ -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)