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

@ -38,37 +38,37 @@ freedesktop-icons = "0.2.2"
git = "https://github.com/pop-os/cosmic-theme.git"
[dependencies.iced]
path = "iced"
path = "../fork/iced/"
default-features = false
features = ["image", "svg"]
[dependencies.iced_core]
path = "iced/core"
path = "../fork/iced/core"
[dependencies.iced_widget]
path = "iced/widget"
path = "../fork/iced/widget"
[dependencies.iced_accessibility]
path = "iced/accessibility"
path = "../fork/iced/accessibility"
optional = true
[dependencies.iced_tiny_skia]
path = "iced/tiny_skia"
path = "../fork/iced/tiny_skia"
optional = true
[dependencies.iced_style]
path = "iced/style"
path = "../fork/iced/style"
[dependencies.iced_sctk]
path = "iced/sctk"
path = "../fork/iced/sctk"
optional = true
[dependencies.iced_winit]
path = "iced/winit"
path = "../fork/iced/winit"
optional = true
[dependencies.iced_wgpu]
path = "iced/wgpu"
path = "../fork/iced/wgpu"
optional = true
[workspace]

2
iced

@ -1 +1 @@
Subproject commit 7bb11b71ea4614bd0d177a1f7f59394ff6c83ca0
Subproject commit 422d1f1e09dbceee3fbdf08e62e96779e5d60cf1

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)