test(shell): dock drag and drop, floating fallback, workspaces and audit; ADR 0075, guide (M8)

This commit is contained in:
Tanish Manku committed 2026-11-12 17:13:17 -07:00
1 parent 0636921987
commit 2bb01f9c2f
13 files changed
+409 -34

No files matched your search

+12
View File
@@ -2,6 +2,18 @@
## Unreleased
* **Dockable panels and workspaces** (M8, ADR 0075, fixes #249).
* Drag any panel's tab to dock it on any side of the stage (the timeline above the stage, for
example), stack it with other panels as a tab, or float it in a window of its own (inside
the editor where a system can't open one). Docks and the lines between panel groups resize,
groups fold, and every panel has a menu (☰, or right-click its tab) to dock, float or close
it from the keyboard.
* **Window** lists every panel; choosing one brings it forward, reopening it where it was.
* **Window › Workspace**: Essentials (the layout so far), Animator and Designer, your own with
**Save Workspace…**, and **Reset**. Where everything is is kept in your preferences.
* New **Colour** (stroke and fill, Swap, Black and White) and **Output** (Test Movie's lines,
kept after it closes) panels. Ctrl+F6 visits every docked panel in the order they are docked.
* **Fixed: start-up, files and display, from user reports** (M8).
* Fixed: Flash files that opened in 0.1 no longer opening (#226). One damaged or unreadable
part of a `.fla` (a bitmap, a sound, a library symbol) no longer stops the whole file from
@@ -0,0 +1,116 @@
# ADR 0075: Dockable panels and workspaces
* Status: accepted (2026-11-12)
* Relates to: roadmap M8, issue #249, ADR 0005 (UI guidelines), ADR 0022 and ADR 0064
(accessibility, Ctrl+F6), ADR 0040 (localisation), ADR 0058 (Movie Explorer tab), ADR 0062
(Test Movie's window of its own and its fallback)
## Context
The shell had a fixed layout: tools on the left, Properties, Align, Library/Movie Explorer and
History as bands in the right column, the timeline (with the Motion Editor as a second tab) at
the bottom, Actions as a floating egui window. Artists coming from Animate rearrange panels
constantly; the first thing the reporter of #249 does in Animate is dock the timeline above the
stage. We need panels that dock on any side, stack as tabs, resize, float in windows of their
own, close and reopen, and named workspaces, kept between sessions, without losing what the
fixed layout guaranteed: the default look (`--screenshot`), Ctrl+F6 focus cycling, the
accessibility audit, high contrast, translation, and the timeline header fitting at 1600 pt.
Animate's behaviour was learned from Adobe's public help pages (Workspace, Panels, Workspaces)
and from observation; no code or assets were used.
## Decision
1. **Our own small dock, not a crate.** `egui_dock` 0.21 (MIT, matches egui 0.36) was the
obvious candidate and was evaluated. It was not taken because:
* its tabs, close buttons and splitters carry no AccessKit role or name, so the audit that
every interactive node is named (ADR 0022) would fail, and naming its widgets from outside
means depending on its private ids;
* it floats tabs only as egui windows inside the main window; windows of their own (the
brief, and Animate) would still have to be written on top of it;
* its tree model allows any nesting, which makes "reset to Essentials", reopening a closed
panel where it was, and a predictable Ctrl+F6 order harder to define, while Animate's
own model is simpler: docks around the document, each a list of tab groups;
* it brings three more crates (`duplicate`, `paste`, `thiserror`), one unmaintained.
The own implementation is about 1,300 lines with its tests, split as the code base is:
`src/dock.rs` is the pure model (no drawing, tested headless), `src/dock_ui.rs` draws it.
2. **The model.** A `Layout` has four `Zone`s (left, right, top, bottom). A zone has a size
(`None`: from the window, the old formula) and `Group`s: stacked top to bottom in the side
docks, side by side above and below the stage. A group is tabs (`Panel`s), the shown tab, a
`share` of its dock (only ratios count) and `folded` (side docks). Floating panels have a
place and size. `homes` remembers, per panel, where it was when it left a dock: its side, a
panel it was stacked with or next to, and whether it was floating when closed. Moves are
expressed against panels, not indices (`Target::Stack(with)`, `Target::Split { side,
before }`, `Target::Float(at)`), so a move stays right while the groups shift under it.
Every panel is in at most one place; `tidy` holds anything read from a file to that and to
finite, bounded sizes. The ten panels: Properties, Align, Colour, Library, Movie Explorer,
History, Timeline, Motion Editor, Actions, Output. Colour (stroke and fill, Swap, Black and
White, applied to the selection as one undo step) and Output (the running Test Movie's
lines, kept after it closes) are new, small panels; the Movie Explorer and Motion Editor
stop being special tabs and become panels. The tools column stays fixed (see Not yet).
3. **Drawing.** Each non-empty zone is an `egui::Panel` (resizable; its id carries an epoch
bumped when a workspace is switched or reset, so the new sizes apply), drawn in the old
nesting order (tools, left, right, bottom, top, then the stage), so Essentials draws exactly
as before. Groups in a side dock get the old band header (accent edge, fold chevron) with
the tabs on it; groups above and below the stage get the old timeline header row, with the
timeline's own transport and buttons beside the tabs, as before. Each header ends with a
panel menu (☰; also on right-click of a tab): dock on any side, float, fold, close, close
the tab group, so everything a drag does can be done from the keyboard. Lines between
groups are draggable splitters, named for screen readers.
4. **Dragging a tab** moves its panel. While dragging, the target is shown over the editor:
a group's header stacks it there; the first or second half of a group's body makes a group
of its own before or after it; near an edge of the stage (22 %) docks it on that side
(this is how the timeline goes above the stage); anywhere else floats it there. Esc
cancels. The drop targets are the rectangles the groups were drawn in this frame.
5. **Floating** uses ADR 0062's host choice: a window of its own (an egui immediate viewport,
drawn in the editor's frame with the editor's state, no threads), or, where the platform
says there can't be one (the web build, embedded viewports), an egui window inside the
editor. Both have **Dock** (back to its home) and the panel's contents. In a window of its
own the app's Ctrl/Alt shortcuts are forwarded (as Test Movie does), unless a text field
has the keyboard. Its desktop place and size are recorded while it is open and written to
the preferences when AniCraft quits (never fed back into the viewport builder while open,
which would fight the window manager).
6. **Workspaces** live in the preferences (`workspaces`): the current key, each workspace's
live arrangement and the user's saved ones. Built in: **Essentials** (the old layout, with
window-derived sizes), **Animator** (a tall timeline with Output and History beside it, a
slim right dock) and **Designer** (a wide Properties with Colour and Align, a short
timeline). As in Animate, changes to a workspace are kept until **Reset**, which goes back
to the built-in layout or to the one saved. **Save Workspace…** names the current
arrangement (not a built-in name; at most 50, 64 characters); saving under an existing
name of yours replaces it. Every change is kept at once and written to the preferences
when no pointer button is down (not in screenshot runs). Reading is lenient: an unknown
panel (a newer version's), a missing or junk field drops only that entry, never the rest
of the preferences; a missing current workspace falls back to Essentials.
7. **Keyboard focus (Ctrl+F6).** `a11y::Region` is now `Stage`, `Tools` or `Panel(p)`, and
the cycle order is set each frame from the layout: the stage, the top, bottom, right and
left docks' panels in order, floating panels drawn inside the editor, the tools. A panel
whose tab is behind another, or folded, has no anchor and is skipped, as before. The shown
tab is each panel's anchor, unless the panel registers its own (the timeline's frame grid,
a surface). Panels in a window of their own are left out: that window has its own focus.
Essentials therefore has seven stops (Align and History are their own panels now) instead
of five.
8. **Not a command.** Where panels are is view state, like zoom and onion skin (golden rule 2
keeps view state in the shell); it is never in a document, the CLI or MCP.
## Consequences
* The default screenshot is the old layout; History is now always visible at the bottom of
the right dock (before, Properties and Library could push it out of view).
* The Motion Editor no longer shows the timeline's transport above it (it is its own panel,
as in Animate). The Library band lost its inner Library / Movie Explorer pill tabs: the
group's tabs replace them.
* Tests: the model (essentials, every panel reachable in every workspace, reopen where it was,
move/stack/split/float/dock back, preferences round trip, files from other versions,
workspaces keep changes until reset), the shell (the default layout, dragging the timeline
tab above the stage and onto the Library's header, a drop away from the docks floats and Esc
cancels, floating inside the editor without viewports and in a viewport with them, every
panel opened from the Window menu draws, workspace switch with its sizes, reset and save),
the accessibility audit with every panel shown, floating, in a window of its own, in Animator,
Designer and with the timeline above the stage, and the Ctrl+F6 order.
## Not yet
* Moving the tools column; dragging a floating window's tab back into a dock (use **Dock** or
the panel menu); several panels as tabs in one floating window; deleting and renaming saved
workspaces; collapsing a dock to icons; minimum sizes per panel; Ctrl+L-style panel keys.
-1
View File
@@ -23,4 +23,3 @@ has to renumber because another PR merged first.
| Number | Pull request | Topic |
|---|---|---|
| 0037 | #38 (outside contribution) | Interface languages |
| 0075 | m8/dockable-panels | Dockable panels and workspaces |
+13 -11
View File
@@ -10,30 +10,32 @@ On macOS, press ⌘ where this guide says Ctrl, and ⌥ where it says Alt.
## Panels
AniCraft keeps its panels docked in one fixed layout: tools on the left, the stage in the middle,
Properties and the Library on the right, and the timeline at the bottom. You don't open or close
most of them; they are always there.
AniCraft opens with its panels docked as in Animate's Essentials: tools on the left, the stage
in the middle, Properties and the Library on the right, and the timeline at the bottom. As in
Animate, you drag a panel's tab to dock it elsewhere (the timeline above the stage, for
example), stack it with other panels or float it, and **Window › Workspace** has Essentials,
Animator and Designer, plus your own saved workspaces and Reset.
| In Animate | In AniCraft |
|---|---|
| Tools | The tools column on the left. A drawing tool's options show at the top of Properties while it is active. |
| Timeline | The timeline at the bottom (**Window › Timeline**). |
| Properties | Properties on the right, always shown. |
| Properties | Properties on the right (**Window › Properties**). |
| Library | The Library on the right (**Window › Library**). |
| Motion Editor | A tab beside the timeline (**Window › Motion Editor**). |
| Actions (**F9**) | The Actions panel, same key (**Window › Actions**). |
| Movie Explorer (**Alt+F3**) | Same key; a tab next to the Library (**Window › Movie Explorer**). |
| Output | The Output panel inside Test Movie. |
| Align | The Align section on the right, and **Modify › Align**. |
| History | The History section on the right. |
| Color and Swatches | Click the Fill or Stroke squares in the Tools panel, or any colour swatch in Properties: web-safe swatches, a mixer and a hex field. |
| Output | The Output panel inside Test Movie, and **Window › Output**, which keeps the last run's lines. |
| Align | The Align panel on the right, and **Modify › Align**. |
| History | The History panel on the right. |
| Color and Swatches | **Window › Colour** (stroke and fill, Swap, Black and White). Click the Fill or Stroke squares in the Tools panel, the Colour panel, or any colour swatch in Properties: web-safe swatches, a mixer and a hex field. |
| Transform and Info | Position, scale and rotation rows in Properties, and the Free Transform tool. |
| Scene | The scene menu at the top left of the stage, **Insert › Scene** and **Modify › Scene**. |
| Find and Replace | **Edit › Find and Replace** (**Ctrl+F**). |
| Publish Settings | **File › Publish Settings…** (**Ctrl+Shift+F12**). |
Not in AniCraft yet: saved workspaces and rearranging panels, Components, Code Snippets and the
Assets panel. See [The workspace](workspace.md) for a tour.
Not in AniCraft yet: Components, Code Snippets, the Assets panel, and moving the Tools panel.
See [The workspace](workspace.md) for a tour.
## Tools and their keys
@@ -115,7 +117,7 @@ frame, and **Shift+PageUp** and **Shift+PageDown** for the previous and next sce
draw with Object Drawing (**J**) to keep shapes apart.
* **Ctrl+F8** (New Symbol): not there yet. Draw something and convert it with **F8**.
* **Ctrl+J** (Document Settings): it is **Modify › Document Settings**, with no key by default.
* Panel toggles such as **Ctrl+L** for the Library aren't needed, because the panels are docked.
* Panel toggles such as **Ctrl+L** for the Library have no key yet; use the **Window** menu.
* **Ctrl+0** fits the stage in the window and **Ctrl+1** shows it at 100 %.
Any key can be changed in **Help › Keyboard Shortcuts** (**F1**), so you can bring back a habit
+61 -10
View File
@@ -11,7 +11,8 @@ Shortcuts are written the Windows and Linux way. On macOS, use ⌘ (Command) for
## The window layout
AniCraft has a single window with fixed, docked panels:
AniCraft opens with the **Essentials** workspace: the panels docked as below. You can move
every panel (see [Arranging panels and workspaces](#arranging-panels-and-workspaces)).
| Area | Where | What it's for |
|---|---|---|
@@ -26,19 +27,62 @@ AniCraft has a single window with fixed, docked panels:
| History | right, bottom | Every undo step. Click one to go back to it. |
| Status bar | bottom edge | Hints and messages, the pointer's position, autosave time and how much undo history is kept. |
Every section in the right-hand dock has a header you can click to fold it away and give the
others room. You can drag the edge between the stage and the dock, and between the stage and
the timeline, to resize them.
Click the arrow at the left of a panel group's header to fold the group away and give the
others room. Drag the edge between the stage and a dock, or the line between two panel groups,
to resize them.
Some things open in windows of their own, which stay open while you work:
* **Window › Actions** (**F9**): what keyframes and buttons do (see
[Interactivity](interactivity.md)).
* **Edit › Find and Replace** (**Ctrl+F**).
* **File › Publish Settings…** (**Ctrl+Shift+F12**).
* **Control › Test Movie** (**Ctrl+Enter**) plays your movie in its own window.
Panels can't be undocked, rearranged or saved as workspace layouts yet.
**Window › Actions** (**F9**) opens the Actions panel floating in a window of its own (see
[Interactivity](interactivity.md)); you can dock it like any other panel.
## Arranging panels and workspaces
Every panel can go anywhere: Properties, Align, Colour, Library, Movie Explorer, History,
Timeline, Motion Editor, Actions and Output.
* **Move a panel** by dragging its tab. While you drag, a blue area shows where it will go:
* onto another group's header: it joins that group as a tab;
* onto the top or bottom half of a group (left or right half below and above the stage): a
group of its own just there;
* near an edge of the stage: a dock on that side. This is how you put the **timeline above
the stage**: drag its tab to the top of the stage;
* anywhere else: it floats in a window of its own.
Press **Esc** while dragging to leave everything as it was.
* **Use the panel menu** (the ☰ button at the right of each group's header, or right-click a
tab) to dock a panel on any side, float it, fold its group, close it or close the whole tab
group, without dragging.
* **Floating panels** have their own window on the desktop, which you can put on another
screen. **Dock** in that window puts the panel back where it came from. Your shortcuts with
Ctrl or Alt (Undo, Save, Test Movie…) still work there. Where a system can't open another
window (the web version), a floating panel floats inside the AniCraft window instead.
* **Close a panel** from its menu, or from its floating window. **Window** lists every panel,
ticked while it's in front; choose one to bring it forward (it reopens where it was), or
choose a ticked one to close it.
**Ctrl+F6** moves the keyboard from panel to panel in the order they are docked (the stage,
the docks above, below and to the right and left of it, floating panels inside the window,
then the tools). Panels in a window of their own have their own keyboard.
### Workspaces
A workspace is a named arrangement of the panels. **Window › Workspace** has three:
| Workspace | What it's for |
|---|---|
| **Essentials** | The layout above. |
| **Animator** | A tall timeline, with the Output and History beside it, and a slim right dock. |
| **Designer** | A wide Properties panel with Colour and Align under it, and a short timeline. |
Each workspace remembers how you changed it, until you choose **Window › Workspace › Reset**.
**Save Workspace…** keeps the current arrangement under a name of your own; it's listed with
the others, and Reset brings it back as you saved it. Your workspaces and where every panel is
are kept in your preferences, so AniCraft opens the way you left it.
### Properties
@@ -55,11 +99,18 @@ Properties changes with what you're doing, from top to bottom:
Changes show on the stage as you drag a value, and each drag is a single undo step.
### Colour and Output
**Colour** sets the stroke and fill colours new shapes and text use; with something selected,
a change also recolours the selection (one undo step). **Swap** exchanges the two, and **Black
and White** sets a black stroke and a white fill. **Output** shows what the running Test Movie
writes (its `trace` actions, frame-script logs and anything that couldn't run), and keeps the
last run's lines after Test Movie closes.
### The Window menu
The **Window** menu switches between the tabs and panels: **Timeline** and **Motion Editor**
(the bottom tabs), **Actions** (**F9**), **Library** and **Movie Explorer** (**Alt+F3**), and
**Onion Skin**.
The **Window** menu has the workspaces, every panel (**Actions** is **F9**, **Movie Explorer**
**Alt+F3**), the **Brush Library** and **Onion Skin**.
## The command palette
+2 -2
View File
@@ -41,7 +41,7 @@ milestone ends with a green tree: build, tests, clippy, a `--screenshot` check a
| **M5** | Rich media | ~~Text engine~~ ✅ first slice (ADR 0012: `harfrust` shaping, `skrifa` outlines, line wrapping, outlines stored with the text; per-character styles later); ~~text on a path~~ ✅ first slice (ADR 0070: a copy of a shape's outline in the block, glyphs set by arc length and stored as outlines, offset, flip and alignment, Attach to Path by picking a shape, SVG `textPath`; editing the path in place and several lines on a path later); ~~dynamic and input text fields~~ ✅ first slice (ADR 0066: Text type in Properties, instance names, `field.text`/`appendText`/`length` in scripts, typing with caret, selection, max chars and passwords in Test Movie, native inputs in the HTML export, XFL fields kept; `htmlText`, change events, embedded fonts in HTML and other `TextField` API later); ~~bitmap import and bitmap fills~~ ✅; ~~audio layers, waveform display, stream sync~~ ✅ first slice (ADR 0020: WAV, Ogg Vorbis, MP3; `cpal` output); ~~effect envelopes, layer volume and mute, sounds inside symbols~~ ✅ (ADR 0039); ~~button sounds and hit-area editing~~ ✅ (ADR 0057: state sounds in Test Movie and HTML, state names on the timeline, the Hit area over the other states, Show hit areas in Test Movie, XFL sounds in the package); ~~filters (blur, drop shadow, glow, colour matrix)~~ ✅, ~~bevel, gradient glow and gradient bevel~~ ✅ (ADR 0025; SVG export and XFL import; filter presets, reordering, on/off and tweened filter values later) and ~~blend modes~~ ✅ on Movie Clips. |
| **M6** | Interactivity & extensibility | **Plug-ins: the Craft-family WebAssembly system** (same host model as PhotoCraft: `wasmi` sandbox, `plugin.*` commands; AniCraft ABI for vector/timeline operations and exporters): first slice ✅ (command plug-ins over the registry, ADR 0017; exporter and easing kinds later); ~~frame scripts on the same sandbox~~ ✅ and ~~button states in test-movie preview~~ ✅ first slice (ADR 0024: action IR, pure player, Actions panel, Test Movie); ~~HTML canvas runtime export~~ ✅ first slice (ADR 0028: one self-contained page, baked frames, a JS port of the player tested against it; ~~filters, Subtract and Invert in the page~~ ✅, ADR 0072); command macros. **ActionScript compatibility, low priority** (ADR 0013), last in M6 and free to slip past M8: ~~tier 1 keeps scripts~~ ✅ (XFL frame scripts and class names stored verbatim, the Actions panel's Script view, `script.*` commands); ~~tier 2 runs the ActionScript 3 timeline subset (stop, play, go to frame or label, named instances, button events) in Test Movie and HTML canvas export through the same action IR as WebAssembly frame scripts~~ ✅; ~~tier 2.5 small logic (typed variables, expressions, `if` and loops, property reads, functions across frames, enter-frame and keyboard listeners, seeded random, ADR 0052)~~ ✅. The full language, the `flash.*` API and SWF bytecode are not planned. |
| **M7** | Advanced animation | ~~Bone/IK tool~~ ✅ first slice (ADR 0043: symbol-instance armatures on an armature layer, Bone tool, joint-angle poses tweened with easing, CCD inverse kinematics with joint limits and pins, posing with the Selection tool, Bone properties, every export; not yet: spring, joint translation, runtime armatures, XFL armature import, editing member instances' properties in place); ~~shape armatures~~ ✅ first slice (ADR 0071: bones inside one shape, automatic binding, linear blend skinning, Bind tool; not yet: instances and shapes in one armature, reshaping a bound shape, painted weights); ~~camera layer with depth~~ ✅ first slice (ADR 0027: one camera layer per scene, pan/zoom/rotate/tint, classic and motion tweens, pan-only layer depth, Camera tool, Preview Through Camera, every export; not yet: editing while previewing, perspective depth, brightness/advanced colour, attaching layers to the camera, XFL camera import); ~~variable-width strokes~~ ✅ first slice (ADR 0018: width profiles, Width tool, exports, tweens); ~~Brush tool~~ ✅ first slice (ADR 0033: filled sweeps, tips, pressure, Paint Normal/Fills/Behind; not yet: Paint Selection/Inside); ~~brush library, pressure curves and the Paint Brush~~ ✅ first slice (ADR 0068: parameter presets, user brushes and brush sets, curve editor, velocity, stroke mode; not yet: tilt, textured brushes); ~~Eraser and Eyedropper~~ ✅ first slice (ADR 0034: five erase modes, Faucet, Erase Everything; picks solid, gradient, bitmap and line styles; not yet: erasing inside symbols, gradients and width profiles in the merge) and brush library; asset warp; graph-based easing presets library. |
| **M8** | Release quality | ~~Installers and signing for Windows/macOS/Linux~~ ✅ first slice (ADR 0026: family `packaging/` layout, MSI, DMG, AppImage/deb/rpm/Flatpak/tar.gz, `.anicraft` registered everywhere, signing wired to the release environment; ~~opening documents from Finder~~ ✅ (ADR 0062, to be checked on a Mac); next: AppImage desktop integration, portable mode, store submissions); ~~web build (wasm) of the editor~~ ✅ first slice (ADR 0036: browser file picker and downloads, autosave in browser storage, CPU stage, CI wasm build and tests in Node, the release zip made by `packaging/web/package.sh` and checked in CI (#210); next: releases carrying it and a hosted copy, once the team decides where, Web Audio, WebGPU stage, verified in browsers); ~~localisation~~ ✅ first slice (ADR 0040: `tr!` everywhere in the shell, craft-i18n catalogs, Preferences language, pseudo-locale; next: AniCraft's catalog in craft-i18n, engine messages, right to left once egui can lay it out); accessibility: first pass ✅ (ADR 0022: screen-reader names for every control, Ctrl+F6 panel focus, high-contrast theme, 200 % scale), second pass ✅ (ADR 0064: stage elements and timeline frames for screen readers, keyboard selection on the stage, keyboard menu bar, following the system's contrast setting), next: live screen-reader passes on each platform, a light palette; ~~crash-recovery autosave~~ ✅ (ADR 0015); ~~Find and Replace and the Movie Explorer~~ ✅ first slice (ADR 0058: `find.search`/`find.replace`/`find.goto` over text, fonts, colours, symbols, sounds and bitmaps, scene or document, linear-time patterns, Replace All as one undo step asking above 100 places, going there opens symbols in place; `explorer.tree` paged, Show filters and search, the Movie Explorer tab beside the Library, lists drawing only the rows in view; not yet: action parameters and ActionScript strings apart from code, font size and style, colour tolerance, renaming in the Movie Explorer); ~~files from the desktop, recent files and a start screen~~ ✅ first slice (ADR 0059: drops route by type and target in one undo step, Open Recent with pins and missing files, start screen with presets and thumbnails); ~~templates, SVG into the Library, drops on the timeline~~ ✅ first slice (ADR 0065: six built-in templates built in code, Save as Template with category and picture, SVG as a graphic symbol, sounds onto a frame's keyframe and media into a keyframe made there; next: exact desktop drop positions once eframe moves to winit 0.31, user template descriptions and renaming); ~~Publish Settings and Publish~~ ✅ first slice (ADR 0060: the publish profile in the document, every format with its export options and an output relative to the document's folder with `{name}`, Shift+F12 publishing in the background with progress, Cancel and one report, overwriting asked once per session, presets in Preferences, the browser's downloads as one ZIP; not yet: Animate's PublishSettings.xml from XFL, more placeholders, outputs outside the document's folder, progress inside HTML, Lottie and audio); ~~documentation book~~ ✅ first slice (ADR 0069: the user guide in `docs/guide/`, generated command and shortcut references, Help › User Guide offline; next: translated guides, search, PDF, context help). |
| **M8** | Release quality | ~~Installers and signing for Windows/macOS/Linux~~ ✅ first slice (ADR 0026: family `packaging/` layout, MSI, DMG, AppImage/deb/rpm/Flatpak/tar.gz, `.anicraft` registered everywhere, signing wired to the release environment; ~~opening documents from Finder~~ ✅ (ADR 0062, to be checked on a Mac); next: AppImage desktop integration, portable mode, store submissions); ~~web build (wasm) of the editor~~ ✅ first slice (ADR 0036: browser file picker and downloads, autosave in browser storage, CPU stage, CI wasm build and tests in Node, the release zip made by `packaging/web/package.sh` and checked in CI (#210); next: releases carrying it and a hosted copy, once the team decides where, Web Audio, WebGPU stage, verified in browsers); ~~localisation~~ ✅ first slice (ADR 0040: `tr!` everywhere in the shell, craft-i18n catalogs, Preferences language, pseudo-locale; next: AniCraft's catalog in craft-i18n, engine messages, right to left once egui can lay it out); accessibility: first pass ✅ (ADR 0022: screen-reader names for every control, Ctrl+F6 panel focus, high-contrast theme, 200 % scale), second pass ✅ (ADR 0064: stage elements and timeline frames for screen readers, keyboard selection on the stage, keyboard menu bar, following the system's contrast setting), next: live screen-reader passes on each platform, a light palette; ~~crash-recovery autosave~~ ✅ (ADR 0015); ~~Find and Replace and the Movie Explorer~~ ✅ first slice (ADR 0058: `find.search`/`find.replace`/`find.goto` over text, fonts, colours, symbols, sounds and bitmaps, scene or document, linear-time patterns, Replace All as one undo step asking above 100 places, going there opens symbols in place; `explorer.tree` paged, Show filters and search, the Movie Explorer tab beside the Library, lists drawing only the rows in view; not yet: action parameters and ActionScript strings apart from code, font size and style, colour tolerance, renaming in the Movie Explorer); ~~files from the desktop, recent files and a start screen~~ ✅ first slice (ADR 0059: drops route by type and target in one undo step, Open Recent with pins and missing files, start screen with presets and thumbnails); ~~templates, SVG into the Library, drops on the timeline~~ ✅ first slice (ADR 0065: six built-in templates built in code, Save as Template with category and picture, SVG as a graphic symbol, sounds onto a frame's keyframe and media into a keyframe made there; next: exact desktop drop positions once eframe moves to winit 0.31, user template descriptions and renaming); ~~Publish Settings and Publish~~ ✅ first slice (ADR 0060: the publish profile in the document, every format with its export options and an output relative to the document's folder with `{name}`, Shift+F12 publishing in the background with progress, Cancel and one report, overwriting asked once per session, presets in Preferences, the browser's downloads as one ZIP; not yet: Animate's PublishSettings.xml from XFL, more placeholders, outputs outside the document's folder, progress inside HTML, Lottie and audio); ~~documentation book~~ ✅ first slice (ADR 0069: the user guide in `docs/guide/`, generated command and shortcut references, Help › User Guide offline; next: translated guides, search, PDF, context help); ~~dockable panels and workspaces~~ ✅ first slice (ADR 0075, #249: every panel docks on any side of the stage, stacks as tabs, resizes, folds, floats in a window of its own with ADR 0062's fallback, closes and reopens where it was from the Window menu; Essentials, Animator, Designer and your own workspaces with Reset, kept in the preferences; new Colour and Output panels; Ctrl+F6 follows the layout; not yet: moving the tools, dragging a floating window back into a dock, several tabs in one floating window, deleting and renaming workspaces, docks collapsed to icons). |
## Releases
@@ -62,7 +62,7 @@ titled with its milestone.
| M5 | Audio layers: import, waveform, playback sync | timeline, layers |
| M6 | ~~WebAssembly plug-ins (U2)~~ ✅ first slice (ADR 0017); ~~frame scripts and Test Movie on the plug-in host~~ ✅ first slice (ADR 0024); ~~HTML canvas runtime export~~ ✅ first slice (ADR 0028); ~~ActionScript tier 1: keep scripts~~ ✅ (ADR 0013); ~~ActionScript tier 2: run the timeline subset~~ ✅ (ADR 0013); ~~ActionScript tier 2.5: small logic~~ ✅ (ADR 0052); next: command macros, or growing the ActionScript subset (`switch`, arrays, event bubbling) | command registry, plug-in host, action IR and player |
| M7 | ~~Variable-width strokes~~ ✅ (ADR 0018), ~~camera layer with depth~~ ✅ first slice (ADR 0027), ~~Bone tool and IK~~ ✅ first slice (ADR 0043), ~~shape armatures and the Bind tool~~ ✅ first slice (ADR 0071), ~~Brush tool~~ ✅ first slice (ADR 0033), ~~Eraser and Eyedropper~~ ✅ first slice (ADR 0034); ~~brush library and pressure curves~~ ✅ first slice (ADR 0068); next: Paint Selection/Inside, tilt | strokes, Pen and Pencil, width profiles, timeline evaluation |
| M8 | ~~Crash-recovery autosave~~ ✅, ~~accessibility first pass~~ ✅ (ADR 0022), ~~installers and signing~~ ✅ first slice (ADR 0026), ~~web build~~ ✅ first slice (ADR 0036), ~~localisation~~ ✅ first slice (ADR 0040), ~~Find and Replace and the Movie Explorer~~ ✅ first slice (ADR 0058), ~~drops, recent files and the start screen~~ ✅ first slice (ADR 0059); ~~templates and drops on the timeline~~ ✅ first slice (ADR 0065); ~~Publish Settings and Publish~~ ✅ first slice (ADR 0060); ~~Test Movie in its own window and macOS document opening~~ ✅ first slice (ADR 0062); ~~accessibility second pass~~ ✅ (ADR 0064); ~~CI on macOS and Windows~~ ✅ (ADR 0067); next: live screen-reader passes | `.anicraft` format, session, AccessKit in eframe |
| M8 | ~~Crash-recovery autosave~~ ✅, ~~accessibility first pass~~ ✅ (ADR 0022), ~~installers and signing~~ ✅ first slice (ADR 0026), ~~web build~~ ✅ first slice (ADR 0036), ~~localisation~~ ✅ first slice (ADR 0040), ~~Find and Replace and the Movie Explorer~~ ✅ first slice (ADR 0058), ~~drops, recent files and the start screen~~ ✅ first slice (ADR 0059); ~~templates and drops on the timeline~~ ✅ first slice (ADR 0065); ~~Publish Settings and Publish~~ ✅ first slice (ADR 0060); ~~Test Movie in its own window and macOS document opening~~ ✅ first slice (ADR 0062); ~~accessibility second pass~~ ✅ (ADR 0064); ~~CI on macOS and Windows~~ ✅ (ADR 0067); ~~dockable panels and workspaces~~ ✅ first slice (ADR 0075); next: live screen-reader passes | `.anicraft` format, session, AccessKit in eframe |
Tasks that wait on an open track: XFL motion tweens (on M2's motion tweens); frame scripts and
ActionScript (on M6's plug-in host).
+13
View File
@@ -391,6 +391,19 @@ mod tests {
for panel in ["select", "motion", "motionspan", "motionpath", "motionpoints", "motionedit", "motionpins", "motionpinsspan", "rawsub", "camera", "cameraview", "bones", "shapebones", "sound", "envelope", "prefs", "shortcuts", "palette", "about", "files", "licenses", "confirm", "recovery", "frames", "actions", "script", "scriptproblems", "testscript", "onion", "onionmenu", "editmultiple", "library", "librarymenu", "edittransform", "onionsymbol", "layerprops", "frameview", "layercolour", "timelinepolish", "convert", "mixed", "bitmap", "nineslice", "nineslicedit", "find", "explorer", "publish", "publishreport", "publishanim", "start", "drop", "droplibrary", "testmovie", "testmovieinside", "templates", "savetemplate", "droptimeline", "textfields", "testtext", "softmask", "pathtext", "brushlibrary", "brushcurve", "paintbrush"] {
found.extend(check(panel, |a, _| a.open_panel(Some(panel))));
}
// Every panel in front where it docks, and floating (ADR 0075); the other workspaces.
for p in crate::dock::Panel::ALL {
found.extend(check(&format!("{p:?} panel"), |a, _| a.show_panel(p)));
found.extend(check(&format!("{p:?} floating"), |a, _| a.dock.move_to(p, crate::dock::Target::Float(None))));
}
found.extend(check("floating panel window", |a, ctx| {
ctx.set_embed_viewports(false);
a.dock.move_to(crate::dock::Panel::Colour, crate::dock::Target::Float(None));
}));
for w in ["animator", "designer"] {
found.extend(check(w, |a, _| a.switch_workspace(w)));
}
found.extend(check("timeline above the stage", |a, _| a.dock.move_to(crate::dock::Panel::Timeline, crate::dock::Target::Split { side: crate::dock::Side::Top, before: None })));
// Test Movie in a window of its own (ADR 0062): its controls, named in that window.
found.extend(check("test movie window", |a, ctx| {
ctx.set_embed_viewports(false);
+13
View File
@@ -1064,6 +1064,19 @@ impl App {
self.publish.selected = anicraft_engine::doc::publish::PublishFormat::Apng;
crate::publish_panel::open(self);
}
// Dockable panels (ADR 0075): the timeline above the stage, the Output beside it,
// Colour stacked with Properties and Align floating.
Some("dock") => {
use crate::dock::{Panel as P, Side, Target};
self.dock.move_to(P::Timeline, Target::Split { side: Side::Top, before: None });
self.dock.move_to(P::Output, Target::Split { side: Side::Top, before: None });
self.dock.move_to(P::Colour, Target::Stack(P::Properties));
self.dock.move_to(P::Align, Target::Float(Some([980.0, 420.0])));
self.dock.top.size = Some(300.0);
self.dock_changed();
}
Some("animator") => self.switch_workspace("animator"),
Some("designer") => self.switch_workspace("designer"),
Some("explorer") => {
// The Movie Explorer tab (ADR 0058), its first rows open: scene, layers, keyframes
// and the instances on them, opening into their symbols.
+4 -3
View File
@@ -475,10 +475,11 @@ pub fn built_in(key: &str) -> Option<Layout> {
bottom: zone(vec![Group::of(&[Panel::Timeline, Panel::MotionEditor], 1.0)], None),
..Layout::default()
},
// Animation first: a tall timeline with the Output beside it, a slim right dock.
// Animation first: a tall timeline with the Output and History beside it, a slim right
// dock.
"animator" => Layout {
right: zone(vec![Group::of(&[Panel::Properties, Panel::Align], 5.0), Group::of(&[Panel::Library, Panel::MovieExplorer, Panel::History], 4.0)], Some(260.0)),
bottom: zone(vec![Group::of(&[Panel::Timeline, Panel::MotionEditor], 3.0), Group::of(&[Panel::Output], 1.0)], Some(440.0)),
right: zone(vec![Group::of(&[Panel::Properties, Panel::Align], 5.0), Group::of(&[Panel::Library, Panel::MovieExplorer], 4.0)], Some(280.0)),
bottom: zone(vec![Group::of(&[Panel::Timeline, Panel::MotionEditor], 3.0), Group::of(&[Panel::Output, Panel::History], 1.0)], Some(440.0)),
..Layout::default()
},
// Drawing first: a wide Properties with Colour and Align, a short timeline.
+169 -3
View File
@@ -162,7 +162,8 @@ pub fn workspace(app: &mut App, ui: &mut egui::Ui) {
// Docks start at their usual size, but never take most of a small window or a large
// interface scale (200 % on a laptop leaves under 1000 × 600 points), and the stage always
// keeps room when the scale goes up later.
let room = ui.available_rect_before_wrap().size();
let room = ui.available_rect_before_wrap();
let room = vec2(room.width(), room.height());
let (dock_w, dock_h) = ((room.x * 0.3).clamp(220.0, 292.0), (room.y * 0.42).clamp(200.0, 292.0));
egui::Panel::left("tools").resizable(false).exact_size(theme::TOOL_BUTTON + 12.0).frame(egui::Frame::NONE.fill(T.panel).inner_margin(egui::Margin::symmetric(0, 8))).show(ui, |ui| crate::panels::tools(app, ui));
app.dock_view.drawn.clear();
@@ -404,7 +405,8 @@ fn tab_widget(ui: &mut egui::Ui, tab: Panel, r: Rect, active: bool, galley: &std
p.rect_filled(r, T.rc(), T.hover);
}
let colour = if active { theme::color(Type::Heading) } else { T.text_dim };
p.galley_with_override_text_color(pos2(r.left() + 8.0, r.center().y - galley.rect.height() * 0.5), galley.clone(), colour);
// A tab too long for the room left is cut at its edge, never drawn over the menu.
p.with_clip_rect(r.intersect(p.clip_rect())).galley_with_override_text_color(pos2(r.left() + 8.0, r.center().y - galley.rect.height() * 0.5), galley.clone(), colour);
if active && several {
p.rect_filled(Rect::from_min_max(pos2(r.left() + 6.0, r.bottom() - 2.0), pos2(r.right() - 6.0, r.bottom())), theme::SQUARE, T.accent);
}
@@ -590,7 +592,7 @@ fn drag_and_drop(app: &mut App, ctx: &egui::Context, acts: &mut Vec<Act>) {
}
let label = crate::i18n::t(p.label());
let g = painter.layout_no_wrap(label.to_string(), font(Type::Label), T.on_fill);
let tag = Rect::from_min_size(pos + vec2(14.0, 10.0), g.rect.size() + vec2(16.0, 8.0));
let tag = Rect::from_min_size(pos + vec2(14.0, 10.0), vec2(g.rect.width() + 16.0, g.rect.height() + 8.0));
painter.rect_filled(tag, T.rc(), T.accent);
painter.galley(tag.min + vec2(8.0, 4.0), g, T.on_fill);
ctx.request_repaint();
@@ -775,3 +777,167 @@ fn own_window(app: &mut App, ctx: &egui::Context, f: &crate::dock::Float, acts:
acts.push(Act::Close(p));
}
}
#[cfg(test)]
mod tests {
use super::*;
use crate::dock::{Place, built_in};
fn app() -> (App, egui::Context) {
let ctx = egui::Context::default();
let session = anicraft_engine::Session::new(anicraft_engine::doc::sample::demo());
// Screenshot mode: default preferences, nothing saved.
let app = App::with_context(&ctx, session, Some(std::path::PathBuf::from("unused.png")));
(app, ctx)
}
fn input(events: Vec<egui::Event>) -> egui::RawInput {
egui::RawInput { screen_rect: Some(Rect::from_min_size(egui::Pos2::ZERO, vec2(1600.0, 940.0))), events, ..Default::default() }
}
fn frame(ctx: &egui::Context, app: &mut App, events: Vec<egui::Event>) {
ctx.run_ui(input(events), |ui| app.frame(ui)).textures_delta.clear();
}
fn settle(ctx: &egui::Context, app: &mut App) {
for _ in 0..3 {
frame(ctx, app, Vec::new());
}
}
fn pointer(pos: egui::Pos2, pressed: Option<bool>) -> Vec<egui::Event> {
let mut v = vec![egui::Event::PointerMoved(pos)];
if let Some(pressed) = pressed {
v.push(egui::Event::PointerButton { pos, button: egui::PointerButton::Primary, pressed, modifiers: egui::Modifiers::NONE });
}
v
}
/// Drags from `from` to `to` in a few steps, as a hand would.
fn drag(ctx: &egui::Context, app: &mut App, from: egui::Pos2, to: egui::Pos2) {
frame(ctx, app, pointer(from, None));
frame(ctx, app, pointer(from, Some(true)));
for i in 1..=8 {
frame(ctx, app, pointer(from + (to - from) * (i as f32 / 8.0), None));
}
frame(ctx, app, pointer(to, Some(false)));
settle(ctx, app);
}
#[test]
fn the_default_layout_is_essentials() {
let (mut app, ctx) = app();
settle(&ctx, &mut app);
assert_eq!(app.dock, built_in("essentials").expect("built in"));
assert_eq!(app.prefs.workspaces.current, "essentials");
// Its groups: four on the right, one below the stage.
let sides: Vec<Side> = app.dock_view.drawn.iter().map(|d| d.side).collect();
assert_eq!(sides, vec![Side::Right, Side::Right, Side::Right, Side::Right, Side::Bottom]);
}
#[test]
fn dragging_the_timeline_tab_docks_it_above_the_stage() {
let (mut app, ctx) = app();
settle(&ctx, &mut app);
let tab = app.dock_view.drawn.iter().find(|d| d.side == Side::Bottom).map(|d| d.header.left_center() + vec2(40.0, 0.0));
let stage = app.dock_view.stage;
let (Some(tab), Some(stage)) = (tab, stage) else { panic!("drawn") };
drag(&ctx, &mut app, tab, pos2(stage.center().x, stage.top() + 20.0));
assert!(matches!(app.dock.place(Panel::Timeline), Some(Place::Docked { side: Side::Top, .. })), "{:?}", app.dock.place(Panel::Timeline));
assert!(app.dock_view.drag.is_none());
assert_eq!(app.prefs.workspaces.live.get("essentials"), Some(&app.dock), "kept as the arrangement of Essentials");
// Dropped on the right dock's Library header: stacked there as a tab.
let library = app.dock_view.drawn.iter().find(|d| d.first == Panel::Library).map(|d| d.header.center());
let tab = app.dock_view.drawn.iter().find(|d| d.side == Side::Top).map(|d| d.header.left_center() + vec2(40.0, 0.0));
let (Some(library), Some(tab)) = (library, tab) else { panic!("drawn") };
drag(&ctx, &mut app, tab, library);
let Some(Place::Docked { side: Side::Right, group, .. }) = app.dock.place(Panel::Timeline) else { panic!("{:?}", app.dock.place(Panel::Timeline)) };
assert_eq!(app.dock.right.groups[group].tabs, vec![Panel::Library, Panel::MovieExplorer, Panel::Timeline]);
assert!(app.dock.top.groups.is_empty(), "the top dock is gone with its last group");
}
#[test]
fn a_tab_dropped_away_from_the_docks_floats_and_esc_cancels_a_drag() {
let (mut app, ctx) = app();
settle(&ctx, &mut app);
let history = app.dock_view.drawn.iter().find(|d| d.first == Panel::History).map(|d| d.header.left_center() + vec2(50.0, 0.0));
let stage = app.dock_view.stage;
let (Some(history), Some(stage)) = (history, stage) else { panic!("drawn") };
// Esc while dragging: nothing moves.
frame(&ctx, &mut app, pointer(history, None));
frame(&ctx, &mut app, pointer(history, Some(true)));
for i in 1..=6 {
frame(&ctx, &mut app, pointer(history + (stage.center() - history) * (i as f32 / 6.0), None));
}
assert_eq!(app.dock_view.drag, Some(Panel::History));
frame(&ctx, &mut app, vec![egui::Event::Key { key: egui::Key::Escape, physical_key: None, pressed: true, repeat: false, modifiers: egui::Modifiers::NONE }]);
frame(&ctx, &mut app, pointer(stage.center(), Some(false)));
assert_eq!(app.dock, built_in("essentials").expect("built in"));
// The middle of the stage: a floating window there.
drag(&ctx, &mut app, history, stage.center());
assert!(app.dock.is_floating(Panel::History));
assert_eq!(app.dock.floating.first().and_then(|f| f.at).map(|a| [a[0].round(), a[1].round()]), Some([stage.center().x.round(), stage.center().y.round()]));
}
#[test]
fn floating_panels_fall_back_inside_the_editor_without_windows() {
// Headless egui has no window system: it embeds viewports, as a system that can't open
// another window does. The panel floats inside, as an egui window with Dock.
let (mut app, ctx) = app();
assert!(ctx.embed_viewports());
app.dock.move_to(Panel::Output, Target::Float(Some([300.0, 200.0])));
settle(&ctx, &mut app);
assert!(app.dock_view.placed.contains(&Panel::Output), "drawn inside the editor");
let area = ctx.memory(|m| m.area_rect(Id::new(("dock_float", Panel::Output.id()))));
assert!(area.is_some_and(|r| (r.left() - 300.0).abs() < 1.0 && (r.top() - 200.0).abs() < 1.0), "where it was put: {area:?}");
// A window of its own where there can be one: drawn in its viewport, not inside.
let (mut app, ctx) = self::app();
ctx.set_embed_viewports(false);
app.dock.move_to(Panel::Output, Target::Float(None));
settle(&ctx, &mut app);
assert!(!app.dock_view.placed.contains(&Panel::Output));
assert!(app.dock.is_floating(Panel::Output));
// Ctrl+F6 leaves it out (its keyboard is its window's).
assert!(!a11y::order(&ctx).contains(&Region::Panel(Panel::Output)));
// Dock puts it back where it came from.
apply(&mut app, vec![Act::DockBack(Panel::Output)]);
assert!(matches!(app.dock.place(Panel::Output), Some(Place::Docked { side: Side::Bottom, .. })));
}
#[test]
fn every_panel_opens_from_the_window_menu_and_draws() {
let (mut app, ctx) = app();
for p in Panel::ALL {
app.toggle_panel(p);
if !app.dock.is_shown(p) {
app.toggle_panel(p);
}
settle(&ctx, &mut app);
assert!(app.dock.is_shown(p), "{p:?}");
let drawn = app.dock.is_floating(p) || app.dock_view.drawn.iter().any(|d| app.dock.zone(d.side).groups.iter().any(|g| g.tabs.first() == Some(&d.first) && g.shown() == Some(p)));
assert!(drawn, "{p:?} is on screen");
}
}
#[test]
fn workspaces_switch_and_reset_with_their_sizes() {
let (mut app, ctx) = app();
settle(&ctx, &mut app);
let width = |app: &App| app.dock_view.drawn.iter().find(|d| d.side == Side::Right).map_or(0.0, |d| d.rect.width());
let essentials = width(&app);
app.switch_workspace("designer");
settle(&ctx, &mut app);
assert_eq!(app.dock, built_in("designer").expect("built in"));
assert!(width(&app) > essentials + 50.0, "the Properties of Designer is wide: {} vs {essentials}", width(&app));
app.dock.close(Panel::History);
app.dock_changed();
app.switch_workspace("essentials");
app.switch_workspace("designer");
assert!(!app.dock.is_open(Panel::History), "changes kept until reset");
app.reset_workspace();
assert_eq!(app.dock, built_in("designer").expect("built in"));
app.save_workspace("Mine");
assert_eq!(app.prefs.workspaces.current, "Mine");
assert!(app.prefs.workspaces.saved.contains_key("Mine"));
}
}
+3 -1
View File
@@ -1,6 +1,6 @@
//! Enforces docs/ui-guidelines.md: typography and colour come from `theme`, never raw values.
const SOURCES: [(&str, &str); 28] = [
const SOURCES: [(&str, &str); 30] = [
("colour.rs", include_str!("colour.rs")),
("drop.rs", include_str!("drop.rs")),
("recent.rs", include_str!("recent.rs")),
@@ -27,6 +27,8 @@ const SOURCES: [(&str, &str); 28] = [
("bone_tool.rs", include_str!("bone_tool.rs")),
("find_panel.rs", include_str!("find_panel.rs")),
("movie_explorer.rs", include_str!("movie_explorer.rs")),
("dock.rs", include_str!("dock.rs")),
("dock_ui.rs", include_str!("dock_ui.rs")),
("publish_panel.rs", include_str!("publish_panel.rs")),
("main.rs", ""),
];
+1 -1
View File
@@ -246,7 +246,7 @@ fn parse_args(args: impl IntoIterator<Item = String>) -> Result<Args, String> {
/// `--help` (the console's text, in English).
#[cfg(not(target_arch = "wasm32"))]
// i18n-exempt: the --help console text
const HELP: &str = "anicraft [file.anicraft|file.fla|file.xfl] [--version] [--screenshot out.png [--shot-width <px>]] [--renderer gl|wgpu|vulkan|dx12|metal] [--theme graphite|high-contrast] [--scale <percent>] [--lang <code>|auto|pseudo] [--open palette|shortcuts|lastscene|start|drop|droplibrary|select|selectzoom|about|files|confirm|transform|points|merge|rawparts|rawedit|rawsub|rawpoints|rawsnap|symboledit|nineslice|nineslicedit|brush|brushing|brushlibrary|brushcurve|paintbrush|eraser|erasing|eyedropper|pen|frames|span|bucket|tlzoom|tlwide|motion|motionspan|motionpath|motionpoints|motionedit|motionpins|motionpinsspan|hints|hintsend|camera|cameraview|filters|strokes|prefs|licenses|zoom|recovery|plugins|actions|script|scriptproblems|testmovie|testmovieinside|testscript|textfields|testtext|softmask|pathtext|button|testhits|exporthtml|publish|publishreport|publishanim|sound|envelope|library|librarymenu|colour|layerprops|frameview|layercolour|timelinepolish]\n\
const HELP: &str = "anicraft [file.anicraft|file.fla|file.xfl] [--version] [--screenshot out.png [--shot-width <px>]] [--renderer gl|wgpu|vulkan|dx12|metal] [--theme graphite|high-contrast] [--scale <percent>] [--lang <code>|auto|pseudo] [--open palette|shortcuts|lastscene|start|drop|droplibrary|select|selectzoom|about|files|confirm|transform|points|merge|rawparts|rawedit|rawsub|rawpoints|rawsnap|symboledit|nineslice|nineslicedit|brush|brushing|brushlibrary|brushcurve|paintbrush|eraser|erasing|eyedropper|pen|frames|span|bucket|tlzoom|tlwide|motion|motionspan|motionpath|motionpoints|motionedit|motionpins|motionpinsspan|hints|hintsend|camera|cameraview|filters|strokes|prefs|licenses|zoom|recovery|plugins|actions|script|scriptproblems|testmovie|testmovieinside|testscript|textfields|testtext|softmask|pathtext|button|testhits|exporthtml|publish|publishreport|publishanim|sound|envelope|library|librarymenu|colour|layerprops|frameview|layercolour|timelinepolish|dock|animator|designer]\n\
--renderer the window's graphics (also ANICRAFT_RENDERER); default automatic, falling back to OpenGL\n\
--open shows a panel at start (handy with --screenshot for visual checks)\n\
--shot-width scales the screenshot down to this width (the user guide's pictures)\n\
+2 -2
View File
@@ -389,11 +389,11 @@ pub(crate) fn colour_panel(app: &mut App, ui: &mut egui::Ui) {
let (mut stroke, mut fill) = (rgb(st.stroke), rgb(st.fill));
let (mut stroke_changed, mut fill_changed) = (false, false);
row(ui, tr!("Stroke"), |ui| {
stroke_changed = ui.color_edit_button_srgb(&mut stroke).named(tr!("Stroke colour")).changed();
stroke_changed = crate::colour::button(ui, &mut stroke).named(tr!("Stroke colour")).changed();
ui.label(text(Type::Data, hex(stroke)).color(T.text_dim));
});
row(ui, tr!("Fill"), |ui| {
fill_changed = ui.color_edit_button_srgb(&mut fill).named(tr!("Fill colour")).changed();
fill_changed = crate::colour::button(ui, &mut fill).named(tr!("Fill colour")).changed();
ui.label(text(Type::Data, hex(fill)).color(T.text_dim));
});
let mut undo = tr_noop!("Colour");