Name Read mode in the folded mode menu

The narrow-window mode menu fell back to "All tools" while Read was active.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
vangel76andClaude Sonnet 5.5 committed 2026-10-26 20:35:42 +01:00
1 parent 88a3f6112b
commit 88649a8955
1 file changed
+7 -2
+7 -2
View File
@@ -505,8 +505,13 @@ pub fn mode_bar(app: &mut PdfCraftApp, ui: &mut egui::Ui) {
}
} else {
// Narrow window: the modes fold into one menu named after the current one.
let current = modes.iter().find(|(m, _)| *m == app.mode).map_or("All tools", |(_, l)| *l);
let resp = widgets::ghost_button(ui, "chevron-down", tl!(current));
// Read is not one of the four choices but can be active (View command): name it too.
let current = if app.mode == Mode::Read {
tl!("Read")
} else {
tl!(modes.iter().find(|(m, _)| *m == app.mode).map_or("All tools", |(_, l)| *l))
};
let resp = widgets::ghost_button(ui, "chevron-down", current);
egui::Popup::menu(&resp).show(|ui| {
ui.set_min_width(160.0);
for (mode, label) in modes {