Commit Graph
16 Commits
Author SHA1 Message Date
aiongg 33a389b1bc Keys: keys::keyed reports a pass's key input, withheld presses included; craft-menu's had_input reads it 2026-11-12 22:54:16 +00:00
aiongg c73f81c011 Keyboard Shortcuts: group header disclosure uses the one disclosure glyph 2026-11-12 22:02:35 +00:00
aiongg ab2be34a61 Keyboard Shortcuts: group headers show as heading rows with their disclosure triangle
A group header is a section row of the table's collection, which takes its press, keys and AccessKit heading node
but builds no row for it. The table declares a sense-less part over each header in view and one over its disclosure
column, and paints a heading ListRow and a triangle Disclosure as their faces, inside the rows' view; the faces have
no nodes of their own. The header shows the lead while the table has focus.

ListRow::disclosure_by_host and disclosure_at are public for hosts outside the widgets crate, and Cx::collection_lead
gives a collection the lead's position (tile grids read it there too).
2026-11-12 15:12:11 +00:00
aiongg 5daf05ff49 Keyboard Shortcuts: a row's shortcuts show as keycaps
Each shortcut of a row is a chip that shows its chord through Kbd's keycap form, the framework's one look for a
chord, and asks to record over it on a click, Enter or Space. The chips no longer take a full-height button.
2026-11-12 14:52:13 +00:00
aiongg 6ce4068b64 ShortcutsDialog: whole chord chips, an add button on every row, the reset arrow
A chip's label replaced its text with the access name, so the chips read "Sav…"; the chord is the painted text and the name stays the label. The shortcut column is as wide as its widest row of chips with the add and restore buttons, at most 40 % of the table, as the old was, and the add button keeps its place after the chips, so it no longer drops off rows. The restore button shows the catalog's new reset icon, a counter-clockwise circle, in place of the undo arrow.
2026-11-12 14:32:48 +00:00
aiongg 045f3b944e craft-menu mnemonic trial: Alt and the English letter open the CJK title 2026-11-12 14:32:46 +00:00
aiongg b2101fa757 Caller rows: ActionsPanel lists the one recording row that applies (panel_rows(recording)), CommandPalette rows are one line with the path before the chord; trials for a CJK title's English mnemonic and for a letter no menu row takes 2026-11-12 14:32:46 +00:00
aiongg 643d83a9e1 MenuItem: a label colour tints the row behind its content (theme MenuTint), and the detail is a muted line under the label; label colour menus in craft-menu, layers, timeline and channels use the tint 2026-11-12 14:32:46 +00:00
aiongg a8cc821ff9 Dropdowns close when the focus leaves their anchor, and Tab in an open Select chooses the row the keys reached
Overlay::dropdown dismisses on focus left (the tree picker and font rows keep it with their own Dismiss). CloseReason::FocusLeft carries what moved the focus (FocusMove: keyboard navigation, or a press or code), recorded where the focus service applies Tab, Shift+Tab and F6. OverlayUi::closing tells the opener why its popup closes this pass: Select commits its proposal on a keyboard focus move, cancels on Escape and on any other focus move. A dropdown's content is no Tab entry, and Tab from inside it goes on from its anchor.
2026-11-12 14:32:43 +00:00
aiongg 4d6ff42eb7 Selection parts: read-only text any component can make selectable
PartsCx::selectable_text declares a run as a selection part with a press-only
stop in no group; step 8b gives the focused one Select All and Copy; and
PaintUi::selectable_text shows it through the text widget with the run's own
galley, in the state's colours. Notice title and message, MetadataTable values
(ListRow::cell_selectable) and SelectableText use it. SelectableText loses its
Bind and Input::Text path and becomes a label whose value is its text. The
suite presses the focus registration's press-only stops when Tab reaches
nothing, instead of guessing from Input::Text and a read-only node.
2026-11-12 14:32:41 +00:00
aiongg 446fcf0aa4 Full-window workspaces take Undo, Redo and the mask view keys themselves
Commands::take_step declares Undo and Redo on the instance around a body and takes the next one fired at it. Liquify, Filter Gallery, Select and Mask, Content-Aware Fill, Vanishing Point and Adaptive Wide Angle step their history from it in their own pass, cancelling an open stroke first; their public step methods go, and so does the shortcuts dialog's hand-written copy. Select and Mask runs MaskViewKeys in its body, and mask_view goes.
2026-11-12 14:32:40 +00:00
aiongg 8735a8b1c5 Document and app crates on the framework: text, pages, table, review, timeline, menu, browse, dialogs, print, font manager, theme store, update, automation 2026-11-12 14:32:38 +00:00
Dylan M. Taylor fe4e2ff3ef menu: never activate a row from an earlier frame (#574)
Nav kept the rows of the last frame that drew them. When a title click
closed the popup before its rows drew again, Enter or Space ran the
cached command with its old enabled state. Nav::load now clears the rows,
so the keys act only on rows drawn this frame under the current gate.
2026-11-03 23:06:04 -05:00
enriquemelzer-bitandenriquemelzer-bit e11f9d9aeb fix(menu): preserve Cargo 1.95 manifest compatibility (#366)
Co-authored-by: enriquemelzer-bit <319226743+enriquemelzer-bit@users.noreply.github.com>
2026-10-27 21:53:44 -04:00
aiongg edc41f68fa craft-menu: shrink-to-fit bar, bar-run Quit, Window list opt-out on macOS; parse the minus sign (#354)
* Add craft-menu: Mac menu-bar layout and native-menu driver

A platform-free menu model (built directly or from flat rows), the macOS
layout (app menu, Window, Help, system-key clash resolution, translatable
labels), and NativeMenu, which feeds a backend's key equivalents to egui as
key presses, runs Minimize and craft-quit's Quit, and re-syncs only when the
app's state changes. Generalised from PhotoCraft's native_menu.rs.

* craft-menu: macOS menu bar through muda

* craft-menu: clipboard keys, layout-assigned shortcuts, Hide Others and atomic rebuilds

* craft-menu: menu key equivalents run while a text field has the keys

* craft-menu: commands as CommandRef, item kinds, craft-keymap chords

Items and rows run a craft_keymap::CommandRef and take a craft_keymap::Chord
shortcut; crates/menu/src/chord.rs is gone. Native ids are the command's key,
made unique with #2, #3 when a command is shown twice. Item.checked becomes
ItemKind { Plain, Check, Radio } (radio shows as a check item on macOS).
The built-in items' commands are Builtin::{Hide, HideOthers, Minimize, Quit}.
MenuRole gains Edit, View and Other; tag_submenu finds its menu by role.
While text editing, the keys left to the field are the clipboard keys and
craft_keymap::text_editing_chords. Adds the Platforms, Document and Gate types
(data only) and MenuBar::documents.

* craft-menu: Gate::allows, the one rule for what may run from the menus

* craft-menu: Windows, Linux and web layouts, documents in Window, keymap adapter

layout(bar, Target, options) dispatches to mac_layout, desktop_layout or
web_layout. Every layout drops what the target's Platforms leave out and lists
MenuBar::documents as radio items last in the Window menu (ItemRole::Document
is gone). Windows and Linux put About in Help, Settings in Edit as
Preferences and Quit in File (Exit on Windows); the web layout has no Quit and
takes the browser's own shortcuts off the items, reporting clashes. tidy drops
empty submenus.

apply_keymap sets shortcuts and toggle check items from a craft-keymap Keymap;
apply_state sets enabled and checked per frame.

* craft-menu: the egui-drawn menu bar for Windows, Linux and the web

* craft-menu: gate, command hook and one muda handler for the native menu

- NativeMenu::set_gate: app items greyed in place while modal or recording a
  shortcut; take_clicks drops clicks the gate forbids when they are taken.
  While recording, key equivalents reach egui as plain key presses.
- NativeMenu::on_command: a hook called from the menu event handler for each
  allowed app click; take_clicks still returns every command.
- Dispatch, shared between the driver and the backend's handler
  (Backend::attach replaces Backend::set_text_editing).
- Only Cmd or Ctrl chords become key equivalents; other shortcuts are not
  shown natively (building an attributed title needs unsafe objc2 calls).
- mac: one muda event handler per process, routed to the latest install;
  mac::install_app_menu ports craft-quit's minimal app menu onto it.
- craft_quit::install_app_menu is deprecated in favor of
  craft_menu::mac::install_app_menu.

* craft-menu: the bar takes Target, README section and NOTICE credit

* craft-menu: bar tests beside the layout and native ones; only a click outside closes the menus

* craft-menu: clippy (complex types, Copy clones, elided lifetimes)

* craft-menu: keyboard access to the egui bar

A tap on Alt alone or F10 focuses the bar, Alt+letter opens a menu and
a letter in an open menu runs or opens the row with that mnemonic, as
in a Windows menu bar. Mnemonics are assigned per level from the shown
labels, underlined only while the keyboard drives the bar, and a label
without an ASCII letter shows its English letter after it ("文件(F)")
through the optional english hook. Preferred letters come from
MenuBarUi::mnemonics. A Mac target has none, and a dialog or the
shortcut recorder keeps the keys. Ported from PhotoCraft's menu_keys.rs
and menu_keys_tests.rs.

* craft-menu: one installer or the other; sort mnemonics before checking uniqueness

* craft-menu: egui 0.37

* craft-menu: text fields keep their Edit items; web names by the browser's system; sync per frame; stable check kinds; handled hook clicks

* craft-menu: sync reports a clash change on an unchanged bar

* craft-menu: shrink-to-fit bar, bar runs Quit and Minimize, mnemonic before an ellipsis documented; craft-keymap: parse the minus sign

* craft-keymap: test the arrow glyphs as keys

* craft-menu: mac::install_with and MacOptions::window_list, for apps that list their documents themselves

* craft-menu: a negative fit limit draws no bar; Window list docs name the Window menu
2026-10-25 23:10:52 -04:00
aiongg 9f89fe8f6d Add craft-menu: one menu definition, native on macOS and an egui bar on Windows, Linux and web (#66)
* Add craft-menu: Mac menu-bar layout and native-menu driver

A platform-free menu model (built directly or from flat rows), the macOS
layout (app menu, Window, Help, system-key clash resolution, translatable
labels), and NativeMenu, which feeds a backend's key equivalents to egui as
key presses, runs Minimize and craft-quit's Quit, and re-syncs only when the
app's state changes. Generalised from PhotoCraft's native_menu.rs.

* craft-menu: macOS menu bar through muda

* craft-menu: clipboard keys, layout-assigned shortcuts, Hide Others and atomic rebuilds

* craft-menu: menu key equivalents run while a text field has the keys

* craft-menu: commands as CommandRef, item kinds, craft-keymap chords

Items and rows run a craft_keymap::CommandRef and take a craft_keymap::Chord
shortcut; crates/menu/src/chord.rs is gone. Native ids are the command's key,
made unique with #2, #3 when a command is shown twice. Item.checked becomes
ItemKind { Plain, Check, Radio } (radio shows as a check item on macOS).
The built-in items' commands are Builtin::{Hide, HideOthers, Minimize, Quit}.
MenuRole gains Edit, View and Other; tag_submenu finds its menu by role.
While text editing, the keys left to the field are the clipboard keys and
craft_keymap::text_editing_chords. Adds the Platforms, Document and Gate types
(data only) and MenuBar::documents.

* craft-menu: Gate::allows, the one rule for what may run from the menus

* craft-menu: Windows, Linux and web layouts, documents in Window, keymap adapter

layout(bar, Target, options) dispatches to mac_layout, desktop_layout or
web_layout. Every layout drops what the target's Platforms leave out and lists
MenuBar::documents as radio items last in the Window menu (ItemRole::Document
is gone). Windows and Linux put About in Help, Settings in Edit as
Preferences and Quit in File (Exit on Windows); the web layout has no Quit and
takes the browser's own shortcuts off the items, reporting clashes. tidy drops
empty submenus.

apply_keymap sets shortcuts and toggle check items from a craft-keymap Keymap;
apply_state sets enabled and checked per frame.

* craft-menu: the egui-drawn menu bar for Windows, Linux and the web

* craft-menu: gate, command hook and one muda handler for the native menu

- NativeMenu::set_gate: app items greyed in place while modal or recording a
  shortcut; take_clicks drops clicks the gate forbids when they are taken.
  While recording, key equivalents reach egui as plain key presses.
- NativeMenu::on_command: a hook called from the menu event handler for each
  allowed app click; take_clicks still returns every command.
- Dispatch, shared between the driver and the backend's handler
  (Backend::attach replaces Backend::set_text_editing).
- Only Cmd or Ctrl chords become key equivalents; other shortcuts are not
  shown natively (building an attributed title needs unsafe objc2 calls).
- mac: one muda event handler per process, routed to the latest install;
  mac::install_app_menu ports craft-quit's minimal app menu onto it.
- craft_quit::install_app_menu is deprecated in favor of
  craft_menu::mac::install_app_menu.

* craft-menu: the bar takes Target, README section and NOTICE credit

* craft-menu: bar tests beside the layout and native ones; only a click outside closes the menus

* craft-menu: clippy (complex types, Copy clones, elided lifetimes)

* craft-menu: keyboard access to the egui bar

A tap on Alt alone or F10 focuses the bar, Alt+letter opens a menu and
a letter in an open menu runs or opens the row with that mnemonic, as
in a Windows menu bar. Mnemonics are assigned per level from the shown
labels, underlined only while the keyboard drives the bar, and a label
without an ASCII letter shows its English letter after it ("文件(F)")
through the optional english hook. Preferred letters come from
MenuBarUi::mnemonics. A Mac target has none, and a dialog or the
shortcut recorder keeps the keys. Ported from PhotoCraft's menu_keys.rs
and menu_keys_tests.rs.

* craft-menu: one installer or the other; sort mnemonics before checking uniqueness

* craft-menu: egui 0.37

* craft-menu: text fields keep their Edit items; web names by the browser's system; sync per frame; stable check kinds; handled hook clicks

* craft-menu: sync reports a clash change on an unchanged bar
2026-10-25 21:59:22 -04:00