fix: apply changes to corner radii in appearance page
This commit is contained in:
parent
d59b5d7895
commit
feb8075d2c
1 changed files with 8 additions and 3 deletions
|
|
@ -580,6 +580,8 @@ impl Page {
|
||||||
}
|
}
|
||||||
Message::Roundness(r) => {
|
Message::Roundness(r) => {
|
||||||
self.roundness = r;
|
self.roundness = r;
|
||||||
|
self.theme_builder.corner_radii = self.roundness.into();
|
||||||
|
theme_builder_needs_update = true;
|
||||||
Command::none()
|
Command::none()
|
||||||
}
|
}
|
||||||
Message::Entered => {
|
Message::Entered => {
|
||||||
|
|
@ -1279,7 +1281,8 @@ pub fn style() -> Section<crate::pages::Message> {
|
||||||
.width(Length::Fill)
|
.width(Length::Fill)
|
||||||
.height(Length::Fixed(100.0))
|
.height(Length::Fixed(100.0))
|
||||||
)
|
)
|
||||||
.style(cosmic::theme::Button::IconVertical)
|
.selected(matches!(page.roundness, Roundness::Round))
|
||||||
|
.style(button::Style::Image)
|
||||||
.padding(8)
|
.padding(8)
|
||||||
.on_press(Message::Roundness(Roundness::Round)),
|
.on_press(Message::Roundness(Roundness::Round)),
|
||||||
text(&descriptions[0])
|
text(&descriptions[0])
|
||||||
|
|
@ -1300,7 +1303,8 @@ pub fn style() -> Section<crate::pages::Message> {
|
||||||
.width(Length::Fill)
|
.width(Length::Fill)
|
||||||
.height(Length::Fixed(100.0))
|
.height(Length::Fixed(100.0))
|
||||||
)
|
)
|
||||||
.style(cosmic::theme::Button::IconVertical)
|
.selected(matches!(page.roundness, Roundness::SlightlyRound))
|
||||||
|
.style(button::Style::Image)
|
||||||
.padding(8)
|
.padding(8)
|
||||||
.on_press(Message::Roundness(Roundness::SlightlyRound)),
|
.on_press(Message::Roundness(Roundness::SlightlyRound)),
|
||||||
text(&descriptions[1])
|
text(&descriptions[1])
|
||||||
|
|
@ -1322,7 +1326,8 @@ pub fn style() -> Section<crate::pages::Message> {
|
||||||
.height(Length::Fixed(100.0))
|
.height(Length::Fixed(100.0))
|
||||||
)
|
)
|
||||||
.width(Length::FillPortion(1))
|
.width(Length::FillPortion(1))
|
||||||
.style(cosmic::theme::Button::IconVertical)
|
.selected(matches!(page.roundness, Roundness::Square))
|
||||||
|
.style(button::Style::Image)
|
||||||
.padding(8)
|
.padding(8)
|
||||||
.on_press(Message::Roundness(Roundness::Square)),
|
.on_press(Message::Roundness(Roundness::Square)),
|
||||||
text(&descriptions[2])
|
text(&descriptions[2])
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue