From be818269bb92c91763c08a7e9b9242b15ed99d63 Mon Sep 17 00:00:00 2001 From: Lionel DARNIS Date: Sun, 9 Aug 2026 15:37:25 +0200 Subject: [PATCH] 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. --- src/main.rs | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 96cec21..375c042 100644 --- a/src/main.rs +++ b/src/main.rs @@ -422,6 +422,7 @@ impl Application for NoctuaApp { .push(widget::space::horizontal().width(Length::Fill)) .push( widget::button::standard("Print") + .leading_icon(widget::icon::from_name("printer-symbolic").size(16).handle()) .on_press_maybe((!self.printing).then_some(Message::Print)), ) .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)), ); - 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(), + ) } }