ui: opaque themed footer bar and print icon
The footer bar inherited the window transparency, making buttons and page info unreadable over document content. Wrap it in a container with the opaque theme background color, matching the header bar. Add a leading printer icon to the Print button.
This commit is contained in:
parent
a3c87fcde4
commit
be818269bb
1 changed files with 28 additions and 1 deletions
29
src/main.rs
29
src/main.rs
|
|
@ -422,6 +422,7 @@ impl Application for NoctuaApp {
|
||||||
.push(widget::space::horizontal().width(Length::Fill))
|
.push(widget::space::horizontal().width(Length::Fill))
|
||||||
.push(
|
.push(
|
||||||
widget::button::standard("Print")
|
widget::button::standard("Print")
|
||||||
|
.leading_icon(widget::icon::from_name("printer-symbolic").size(16).handle())
|
||||||
.on_press_maybe((!self.printing).then_some(Message::Print)),
|
.on_press_maybe((!self.printing).then_some(Message::Print)),
|
||||||
)
|
)
|
||||||
.push(print_status_view(self.print_status.as_ref()))
|
.push(print_status_view(self.print_status.as_ref()))
|
||||||
|
|
@ -435,7 +436,33 @@ impl Application for NoctuaApp {
|
||||||
.on_press_maybe(has_next_page.then_some(Message::NextPage)),
|
.on_press_maybe(has_next_page.then_some(Message::NextPage)),
|
||||||
);
|
);
|
||||||
|
|
||||||
Some(row.into())
|
Some(
|
||||||
|
widget::container(row)
|
||||||
|
.width(Length::Fill)
|
||||||
|
.class(theme::Container::custom(|t| {
|
||||||
|
let cosmic = t.cosmic();
|
||||||
|
let background = cosmic.background(false);
|
||||||
|
cosmic::iced_widget::container::Style {
|
||||||
|
icon_color: Some(background.on.into()),
|
||||||
|
text_color: Some(background.on.into()),
|
||||||
|
background: Some(cosmic::iced::Background::Color(
|
||||||
|
background.base.into(),
|
||||||
|
)),
|
||||||
|
border: cosmic::iced::Border {
|
||||||
|
radius: [
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
cosmic.corner_radii.radius_s[2],
|
||||||
|
cosmic.corner_radii.radius_s[3],
|
||||||
|
]
|
||||||
|
.into(),
|
||||||
|
..Default::default()
|
||||||
|
},
|
||||||
|
..Default::default()
|
||||||
|
}
|
||||||
|
}))
|
||||||
|
.into(),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue