Expand description
The frame every app shares (Shell): an app hands it its registry, its workspaces, its
menus and its Settings sections (ShellSpec), and the frame draws them the same way in
every app (Affinity’s layout):
- Title bar: the app’s menu (named after the app: files, Settings) and Help at the left, then the workspace switcher; at the right the project, the remote button (where the app runs), the layout toggles (commands, as icon buttons) and the theme.
- Menu row: the current workspace’s menus, built from the registry.
- Body: the current workspace’s view, a card on the chrome.
- Status bar: a status line, the running jobs (
crate::jobs) with a cancel button each, and this computer’s load (CPU, memory). - Settings (Ctrl+,): sections on the left (Appearance, built in, then the app’s), the section’s settings on the right.
- Search (Ctrl+K, F3) over the registry.
- Window frame: where the app draws its own frame (client-side decorations on Linux), the window has rounded corners while it floats and resizes from its own edge; no shadow margin (compositors that do not draw it showed what was behind the window there).
- Overlay: one view of the app’s over everything (
Shell::set_overlay: a help sheet, a dialog).
The frame adds its own commands to the registry (shell.search, shell.settings,
shell.theme, shell.workspace.<id>), so they are in the search and an agent’s tools too.
Structs§
- Remote
Spec - Where the app runs, at the right of the title bar (as VS Code’s remote indicator): this computer, or a server. Its menu lists the places.
- Settings
Section - A section of Settings an app registers (Compute, Models, Plugins…).
- Shell
- The frame.
- Shell
Spec - What an app hands the frame.
- Workspace
Spec - A workspace of the app (Explore, Pipeline, Analyze; Sorting…).
Enums§
- Shell
Event - What the frame tells the app.
Constants§
- MENU_
ROW_ H - Height of the menu row (px).
- RESIZE_
BAND - The band at the window’s own edge that resizes it while it floats (px).
- STATUS_
BAR_ H - Height of the status bar (px): one 24 px target.
- TITLE_
BAR_ H - Height of the title bar (px).
- WINDOW_
RADIUS - Rounded corners of the window while it floats (px).
Functions§
- frame_
rounded - Whether the window draws its own rounded frame: client-side decorations on a floating window (square when maximised, full screen or tiled).
- resize_
edge - The edge a press at
p(window px) resizes, withinRESIZE_BANDof asizewindow’s edge.
Type Aliases§
- Section
Body - Draws a Settings section’s body.
- Status
Items - Draws the app’s readings in the status bar.