mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-25 20:14:31 +01:00
ee0d1795bb4df83b6eb814dd6cd0bf678d94de69
11
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
5ecba486c3 |
Merge remote-tracking branch 'origin/next' into sync/next
# Conflicts: # crates/behavior/src/overlay.rs # crates/ui-canvas/src/canvas_controls/guides/mod.rs # crates/ui-contract/src/contract/label/step.rs # crates/ui-contract/src/contract/overlay/placement.rs # crates/ui-contract/src/contract/tooltip.rs # crates/ui-patterns/tests/it/docking/native.rs # crates/ui-shell/tests/it/shell/app_shell.rs |
||
|
|
03ef0d0817 |
Merge remote-tracking branch 'origin/next' into sync/next
# Conflicts: # crates/automation/Cargo.toml # crates/automation/src/client.rs # crates/automation/src/control.rs # crates/automation/src/screenshot.rs # crates/automation/src/synthetic.rs # crates/automation/tests/it/main.rs # crates/automation/tests/it/synthetic.rs # crates/color-ui/src/palette.rs # crates/color-ui/src/ui/area.rs # crates/color-ui/src/ui/disc/stories.rs # crates/color-ui/src/ui/mod.rs # crates/color-ui/src/ui/paint_chip.rs # crates/color-ui/src/ui/pair/stories.rs # crates/color-ui/src/ui/palette/stories.rs # crates/color-ui/src/ui/panel.rs # crates/color-ui/src/ui/picker/stories.rs # crates/color-ui/src/ui/picker_dialog.rs # crates/color-ui/src/ui/swatches/library.rs # crates/color-ui/src/ui/swatches/panel.rs # crates/color-ui/src/ui/swatches/stories.rs # crates/color-ui/src/ui/wheel/stories.rs # crates/color-ui/tests/it/main.rs # crates/color-ui/tests/it/panels.rs # crates/color-ui/tests/it/picker.rs # crates/dialogs/src/lib.rs # crates/dialogs/src/native.rs # crates/dialogs/src/portal.rs # crates/dialogs/src/service.rs # crates/draw/src/ui/brush_presets/panel.rs # crates/draw/src/ui/brush_presets/picker.rs # crates/draw/src/ui/brush_presets/stories.rs # crates/draw/src/ui/gradient/palette/mod.rs # crates/draw/src/ui/pattern/editor.rs # crates/draw/src/ui/pen/stories.rs # crates/draw/src/ui/transform/mod.rs # crates/draw/src/ui/transform/transform_box.rs # crates/draw/src/ui/transform/transform_box/stories.rs # crates/draw/src/ui/transform/transform_fields.rs # crates/draw/tests/it/brush_presets.rs # crates/draw/tests/it/main.rs # crates/draw/tests/it/transform_box.rs # crates/font-manager/src/axes.rs # crates/font-manager/src/picker.rs # crates/font-manager/src/picker/rows.rs # crates/font-manager/src/picker/stories.rs # crates/font-manager/tests/it/main.rs # crates/font-manager/tests/it/picker.rs # crates/host/src/files.rs # crates/i18n/src/lib.rs # crates/imaging/src/ui/layer_style/styles.rs # crates/keymap/src/keymap.rs # crates/keymap/src/matcher.rs # crates/layers/src/ui/filter/mod.rs # crates/layers/src/ui/filter/stories.rs # crates/layers/src/ui/mock.rs # crates/layers/src/ui/panel/mod.rs # crates/layers/src/ui/panel/stories.rs # crates/layers/src/ui/tree.rs # crates/layers/tests/it/panel_drag_menu.rs # crates/layers/tests/it/panel_filter.rs # crates/menu/src/bar.rs # crates/menu/src/driver.rs # crates/menu/src/model.rs # crates/menu/src/shortcuts/pages.rs # crates/menu/src/shortcuts/state.rs # crates/menu/src/shortcuts/stories.rs # crates/menu/src/shortcuts/view.rs # crates/menu/tests/it/main.rs # crates/menu/tests/it/native.rs # crates/menu/tests/it/shortcuts/mod.rs # crates/pages/src/ui/mod.rs # crates/pages/src/ui/view.rs # crates/platform/README.md # crates/platform/src/clipboard_tests.rs # crates/platform/src/open.rs # crates/print/src/ui/stories.rs # crates/text/src/ui/character.rs # crates/text/src/ui/character/stories.rs # crates/text/src/ui/find.rs # crates/text/src/ui/find/dialog.rs # crates/text/src/ui/find/stories.rs # crates/text/src/ui/ruler.rs # crates/text/src/ui/ruler/paint.rs # crates/text/src/ui/ruler/run.rs # crates/text/tests/it/main.rs # crates/text/tests/it/ruler.rs # crates/ui-canvas/src/canvas/mod.rs # crates/ui-canvas/src/canvas/tool.rs # crates/ui-canvas/src/canvas/tool_host.rs # crates/ui-canvas/src/canvas_controls/grid/mod.rs # crates/ui-canvas/src/canvas_controls/grid/stories.rs # crates/ui-canvas/src/canvas_controls/guides/stories.rs # crates/ui-canvas/src/canvas_controls/task_bar.rs # crates/ui-canvas/src/canvas_controls/task_bar/stories.rs # crates/ui-canvas/tests/it/canvas/navigate.rs # crates/ui-canvas/tests/it/canvas/rulers.rs # crates/ui-canvas/tests/it/canvas/tool.rs # crates/ui-canvas/tests/it/canvas_controls/grid.rs # crates/ui-contract/src/contract/body/presses.rs # crates/ui-contract/src/contract/items/drag.rs # crates/ui-contract/src/contract/items/hooks.rs # crates/ui-contract/src/contract/items/lead.rs # crates/ui-contract/src/contract/overlay/placement.rs # crates/ui-contract/src/contract/overlay/props.rs # crates/ui-contract/src/contract/overlay/ui.rs # crates/ui-contract/src/contract/steps/label.rs # crates/ui-contract/src/contract/text.rs # crates/ui-contract/src/contract/tooltip.rs # crates/ui-contract/src/layout/body.rs # crates/ui-contract/src/primitives/draw.rs # crates/ui-contract/src/primitives/icon.rs # crates/ui-contract/src/primitives/mod.rs # crates/ui-contract/src/primitives/textures/thumbnails.rs # crates/ui-contract/src/runtime/commands/board.rs # crates/ui-contract/src/runtime/commands/mod.rs # crates/ui-contract/src/runtime/drag.rs # crates/ui-contract/src/runtime/egui/input.rs # crates/ui-contract/src/runtime/egui/plugin.rs # crates/ui-contract/src/runtime/frame.rs # crates/ui-contract/src/runtime/keys.rs # crates/ui-contract/src/runtime/keys/input.rs # crates/ui-contract/src/runtime/keys/route.rs # crates/ui-contract/src/runtime/pointer.rs # crates/ui-contract/src/runtime/wheel.rs # crates/ui-contract/src/runtime/windows.rs # crates/ui-contract/src/runtime/windows/viewport.rs # crates/ui-contract/src/style/cx.rs # crates/ui-contract/src/style/span.rs # crates/ui-contract/src/testing/access.rs # crates/ui-contract/src/testing/icon_trials.rs # crates/ui-contract/tests/it/body/mod.rs # crates/ui-contract/tests/it/runtime/mod.rs # crates/ui-contract/tests/it/runtime/wheel.rs # crates/ui-contract/tests/it/runtime/windows.rs # crates/ui-contract/tests/it/text/editor.rs # crates/ui-gallery/src/mock/panels.rs # crates/ui-panels/src/dialog/mod.rs # crates/ui-panels/src/docking/group.rs # crates/ui-panels/src/rails/drawer/stories.rs # crates/ui-panels/src/rails/tool.rs # crates/ui-panels/src/rails/tool/stories.rs # crates/ui-panels/src/rails/tool/trials.rs # crates/ui-panels/src/sections/footer.rs # crates/ui-panels/tests/it/dialogs.rs # crates/ui-patterns/src/patterns/dock/hide.rs # crates/ui-patterns/src/patterns/dock/panes.rs # crates/ui-patterns/src/patterns/form_dialogs/dialog.rs # crates/ui-patterns/src/patterns/form_dialogs/dialog/stories.rs # crates/ui-patterns/src/patterns/form_dialogs/list_manager.rs # crates/ui-patterns/src/patterns/form_dialogs/list_manager/stories.rs # crates/ui-patterns/src/patterns/form_dialogs/mod.rs # crates/ui-patterns/src/patterns/form_dialogs/new_document.rs # crates/ui-patterns/src/patterns/form_dialogs/new_document/cards.rs # crates/ui-patterns/src/patterns/form_dialogs/new_document/details.rs # crates/ui-patterns/src/patterns/form_dialogs/param.rs # crates/ui-patterns/src/patterns/form_dialogs/pdf_export.rs # crates/ui-patterns/src/patterns/form_dialogs/pdf_export/stories.rs # crates/ui-patterns/src/patterns/form_dialogs/report.rs # crates/ui-patterns/src/patterns/form_dialogs/report/stories.rs # crates/ui-patterns/src/patterns/form_dialogs/rows.rs # crates/ui-patterns/src/patterns/form_dialogs/save_for_web.rs # crates/ui-patterns/src/patterns/form_dialogs/save_for_web/hosted.rs # crates/ui-patterns/src/patterns/form_dialogs/save_for_web/model.rs # crates/ui-patterns/src/patterns/form_dialogs/save_for_web/options.rs # crates/ui-patterns/src/patterns/form_dialogs/save_for_web/stories.rs # crates/ui-patterns/src/patterns/panels/palette.rs # crates/ui-patterns/src/patterns/panels/palette/stories.rs # crates/ui-patterns/src/patterns/preferences/document/model.rs # crates/ui-patterns/src/patterns/preferences/page.rs # crates/ui-patterns/src/patterns/preferences/window.rs # crates/ui-patterns/src/patterns/preferences/window/stories.rs # crates/ui-patterns/src/patterns/presets/browser.rs # crates/ui-patterns/src/patterns/presets/browser/stories.rs # crates/ui-patterns/src/patterns/presets/manager.rs # crates/ui-patterns/src/patterns/presets/mod.rs # crates/ui-patterns/src/patterns/presets/named.rs # crates/ui-patterns/src/patterns/presets/picker.rs # crates/ui-patterns/tests/it/docking/drop_session.rs # crates/ui-patterns/tests/it/docking/native.rs # crates/ui-patterns/tests/it/form_dialogs/hosted.rs # crates/ui-patterns/tests/it/form_dialogs/list_manager.rs # crates/ui-patterns/tests/it/form_dialogs/mod.rs # crates/ui-patterns/tests/it/form_dialogs/params.rs # crates/ui-patterns/tests/it/form_dialogs/save_for_web.rs # crates/ui-patterns/tests/it/panels/palette.rs # crates/ui-patterns/tests/it/presets/browser.rs # crates/ui-shell/src/shell/app_shell.rs # crates/ui-shell/src/shell/app_shell/stories.rs # crates/ui-shell/src/shell/mod.rs # crates/ui-shell/src/shell/start.rs # crates/ui-shell/src/shell/start/stories.rs # crates/ui-shell/tests/it/commands/mod.rs # crates/ui-shell/tests/it/shell/app_shell.rs # crates/ui-shell/tests/it/shell/mod.rs # crates/ui-widgets/src/bars/bar.rs # crates/ui-widgets/src/buttons/button.rs # crates/ui-widgets/src/buttons/face.rs # crates/ui-widgets/src/buttons/mod.rs # crates/ui-widgets/src/buttons/stories.rs # crates/ui-widgets/src/choice/mod.rs # crates/ui-widgets/src/choice/swatch.rs # crates/ui-widgets/src/choice/swatch/stories.rs # crates/ui-widgets/src/choice/swatch_table.rs # crates/ui-widgets/src/choice/swatch_table/stories.rs # crates/ui-widgets/src/display/text.rs # crates/ui-widgets/src/list/row.rs # crates/ui-widgets/src/list/row/paint.rs # crates/ui-widgets/src/list/stories.rs # crates/ui-widgets/src/list/view_stories.rs # crates/ui-widgets/src/menu/bar.rs # crates/ui-widgets/src/menu/item.rs # crates/ui-widgets/src/menu/search.rs # crates/ui-widgets/src/menu/stories.rs # crates/ui-widgets/src/pickers/mod.rs # crates/ui-widgets/src/pickers/reference_point.rs # crates/ui-widgets/src/pickers/reference_point/stories.rs # crates/ui-widgets/src/tabs/strip.rs # crates/ui-widgets/src/text/number.rs # crates/ui-widgets/src/text/number/stories.rs # crates/ui-widgets/src/tile_grid/grid.rs # crates/ui-widgets/tests/it/buttons.rs # crates/ui-widgets/tests/it/label/mod.rs # crates/ui-widgets/tests/it/label/tooltip.rs # crates/ui-widgets/tests/it/main.rs # crates/ui-widgets/tests/it/menu/bar.rs # crates/ui-widgets/tests/it/menu/mod.rs # crates/ui-widgets/tests/it/menu/rows.rs # crates/ui-widgets/tests/it/menu/search.rs # crates/ui-widgets/tests/it/pickers/select_list.rs # crates/ui-widgets/tests/it/text/mod.rs |
||
|
|
6491d45d61 |
menus-w1: net change of 1 commits
- menus-w1: written by an agent |
||
|
|
f016e24751 |
Merge storytold/next into rework-d2
Brings in craft-libs#2756 (frame-t3), #2810 (a memoized view in a row sits on the row's line) and #2838 (home rail look). - egui pin and Cargo.lock: rework-d2's egui rev, which contains #2756's; frame-t3's serde line for craft-tracked. - menu bar: EnglishFn goes with frame-t3's removal of english; rework-d2's docs stay. - Env::start_view_room: keeps both column flags, then Shrink::Fit when the view fits. - lazy::Place: both opacity and fits. - Lazy::run_keyed: a memoized view's room is the row's cap when the row narrows it, else the flow region, and then moves down onto the row's line (on_row_line); the cap is horizontal and the move vertical, and the move keeps the room's size, so a kept run replays moved with it. |
||
|
|
8db22341b4 | A memoized view in a Stack fits its content to its room, as in a shrinking row; the menu bar folds in any Stack | ||
|
|
000a091d4b | craft-menu: English names on the menu model, the MenuBarUi::english hook goes | ||
|
|
1d40128fad | craft-menu: NativeMenu::sync_with is keyed by a checked key; sync and had_input are removed | ||
|
|
4f5c57d86c | tfix5-f10: a command shows a chord only where the keymap runs it (Keymap::shown_chord, holder); resolve, apply_keymap and the Mac layout read it; LayoutOptions::keys replaces extra_shortcuts | ||
|
|
8735a8b1c5 | Document and app crates on the framework: text, pages, table, review, timeline, menu, browse, dialogs, print, font manager, theme store, update, automation | ||
|
|
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 |
||
|
|
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 |