Skip to main content

max / audiofiles

ux: Help menu (shortcuts + About), Cmd+, opens About Previously the toolbar Help button toggled the shortcuts overlay and About was only reachable via Cmd+I. Now Help is a popup with two entries: "Keyboard shortcuts" and "About audiofiles". macOS users get the native Cmd+, shortcut for About too (the closest thing audiofiles has to a preferences screen). Browser→app signal channel mirrors the MidiAction pattern: BrowserState gains a `about_requested` flag set by the toolbar and polled by the app each frame, which flips its own `show_about` modal. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Author: Max Johnson <me@maxj.phd> · 2026-06-03 02:23 UTC
Commit: 640f61bbba8c9aa3ae6ebf147b457d5e03e6607c
Parent: 8b4c5a5
3 files changed, +38 insertions, -3 deletions
@@ -447,9 +447,15 @@ impl eframe::App for AudioFilesApp {
447 447 // Cmd/Ctrl+I toggles the About modal. Works on every screen so a
448 448 // confused user always has one keystroke to "who made this".
449 449 ctx.input_mut(|i| {
450 + // Cmd+I and Cmd+, both toggle About. Cmd+, is the macOS-native
451 + // "Preferences" shortcut; About is the closest thing audiofiles
452 + // has to a preferences screen (only the update-check toggle).
450 453 if i.consume_shortcut(&egui::KeyboardShortcut::new(
451 454 egui::Modifiers::COMMAND,
452 455 egui::Key::I,
456 + )) || i.consume_shortcut(&egui::KeyboardShortcut::new(
457 + egui::Modifiers::COMMAND,
458 + egui::Key::Comma,
453 459 )) {
454 460 self.show_about = !self.show_about;
455 461 }
@@ -708,6 +714,13 @@ impl AudioFilesApp {
708 714 }
709 715 audiofiles_browser::editor::draw_browser(ui, browser, self.sync_manager.as_ref());
710 716
717 + // Toolbar Help menu → About entry. Browser sets `about_requested`;
718 + // we consume it and flip our own modal flag.
719 + if browser.about_requested {
720 + browser.about_requested = false;
721 + self.show_about = true;
722 + }
723 +
711 724 // Drop target indicator: while files are hovering, paint a clear
712 725 // border on top of the whole window plus a centered label. This is
713 726 // the "yes, dropping here will work" feedback the OS doesn't give
@@ -167,6 +167,10 @@ pub struct BrowserState {
167 167 pub show_help: bool,
168 168 /// Help overlay tab: 0 = Shortcuts, 1 = Features.
169 169 pub help_tab: u8,
170 + /// Set by the toolbar's Help menu when the user picks "About". The app
171 + /// layer polls this each frame and flips its own `show_about`. Lives in
172 + /// browser state (not app state) because the browser owns the toolbar.
173 + pub about_requested: bool,
170 174 pub pending_confirm: Option<ConfirmAction>,
171 175
172 176 // VFS management modals
@@ -441,6 +445,7 @@ impl BrowserState {
441 445 midi_pending_action: None,
442 446 show_help: false,
443 447 help_tab: 0,
448 + about_requested: false,
444 449 pending_confirm: None,
445 450 vfs_create_input: String::new(),
446 451 vfs_rename_target: None,
@@ -472,10 +472,27 @@ fn draw_breadcrumb(
472 472 state.settings.show_manager = !state.settings.show_manager;
473 473 }
474 474
475 - // Help button
476 - if ui.button("Help").on_hover_text("Help & keyboard shortcuts (F1)").clicked() {
477 - state.show_help = !state.show_help;
475 + // Help menu: keyboard shortcuts + About. Previously a single Help
476 + // button toggled the shortcuts overlay; About was only reachable via
477 + // Cmd+I. The dropdown groups them under one visible entry point.
478 + let help_id = ui.make_persistent_id("help_menu");
479 + let help_btn = ui.button("Help").on_hover_text("Help (F1 opens shortcuts directly)");
480 + if help_btn.clicked() {
481 + egui::Popup::toggle_id(ui.ctx(), help_id);
478 482 }
483 + egui::Popup::from_response(&help_btn)
484 + .id(help_id)
485 + .open_memory(None)
486 + .close_behavior(egui::PopupCloseBehavior::CloseOnClick)
487 + .show(|ui| {
488 + ui.set_min_width(160.0);
489 + if ui.button("Keyboard shortcuts").clicked() {
490 + state.show_help = true;
491 + }
492 + if ui.button("About audiofiles").clicked() {
493 + state.about_requested = true;
494 + }
495 + });
479 496 });
480 497 }
481 498