Restore page notice bars and Home icon

This commit is contained in:
Dylan M. Taylor
2026-11-21 13:23:26 -05:00
parent 53741bd1a1
commit 2ca0cbb72a
3 changed files with 6 additions and 3 deletions
+2 -2
View File
@@ -49,9 +49,9 @@ pub(super) enum Notice {
LockSignatures,
}
/// One inline notice with the icon named `icon`.
/// One page notice bar with the icon named `icon`.
fn bar(tone: Tone, icon: &'static str, text: String) -> Bar<'static> {
Bar::new(tone, text).layout(NoticeLayout::Inline).icon(NoticeIcon::Custom(IconId::new(icon).into()))
Bar::new(tone, text).layout(NoticeLayout::Bar).icon(NoticeIcon::Custom(IconId::new(icon).into()))
}
/// The notices above the pages, one after another: a file changed on disk first, then what a historical
+3 -1
View File
@@ -18,6 +18,8 @@ pub(crate) mod doc_tabs;
mod mode_bar;
pub(crate) mod view_rail;
pub(crate) const HOME_ICON: &str = "home";
/// Compose the window: title bar, mode bar, view rail and the dock, whose document panel holds the
/// pages.
///
@@ -100,7 +102,7 @@ fn title_bar(app: &mut PdfCraftApp, ui: &mut egui::Ui) {
title,
|ui, _| {
let home = app.active.is_none() && !app.combine_showing();
if IconButton::new(IconId::new("house")).label(tl!("Home")).selected(home).show(ui).clicked() {
if IconButton::new(IconId::new(HOME_ICON)).label(tl!("Home")).selected(home).show(ui).clicked() {
app.active = None;
app.combine_tab.focused = false;
}
+1
View File
@@ -147,6 +147,7 @@ mod tests {
let missing: Vec<String> =
engine_icons().into_iter().filter(|(_, name)| !has_icon(&IconId::new(name))).map(|(owner, name)| format!("{owner}: {name}")).collect();
assert!(missing.is_empty(), "icons nobody has: {missing:?}");
assert!(has_icon(&IconId::new(crate::chrome::HOME_ICON)), "the title bar Home icon resolves");
// The eight documents the comment tools name stay served.
for name in
["message-square-plus", "type", "highlighter", "move-right", "message-square-quote", "message-square-text", "replace", "paperclip"]