GUI requirements¶
Every structural rule the app's widgets are checked against, generated from
detail/gui/requirements.py. Each is a function whose docstring is the sentence below and whose
body is the check, so this page cannot drift from what is enforced.
The reasoning behind these — why the rules exist, what each one cost when it was missing — lives
in docs/gui_design.md. This page is the list.
Button¶
- Button text escapes
&as&&— Qt reads a single one as a keyboard mnemonic. - A button carries text — icons are not used here, so an empty one is unreachable.
- A button is text, never an icon — this app sets no icon sets, SVG or themes.
- A greyed-out button explains itself in its tooltip, so it reads as not-yet, not broken.
- A button in a horizontal row stays as wide as its text: the row gives its spare width to a stretch, never to the buttons.
- No separate button hides or shows a side panel — the panel's grip shuts it, and the strip it leaves is clicked or pulled to open it.
Dialog¶
- A dialog's content sits in one scroll area, with its buttons pinned outside it.
- A dialog shown non-modally has no default or auto-default button: Enter in it clicks
Image¶
- A view that zooms on the wheel claims the wheel; one that does not, does not.
- A view that can be moved out of frame ships a visible way back.
Label¶
- Text on screen can be selected, so it can be copied into a bug report.
Package¶
Rules about what the source tree never does. These cannot be checked by walking widgets — an icon on a list item is not a QWidget — so the subject is detail/gui/ itself, read as a parse tree rather than as text.
- A button has the frame every other button has — nothing in the package calls
setFlat. - A load that can be asked for again names what it loads, so the newest request wins.
- A dialog whose answer comes from background work stays open until that work has answered.
- A widget's palette takes its colour from
gui/status_color.py, not from an RGB triple. - Build a plot with
plot_theme.themed_plotand colour its marks by role, never by literal. - The monospace face and every size step come from
gui/sizing.py, not from a call site. - The GUI uses zero QSS — shapes, palette colours and widget options instead.
- No icon sets, SVG or themes — a control is named by its text.
- An identity's swatch carries its pattern as well as its colour (
plot_theme.label_swatch). - Nothing animates and nothing casts a shadow — the GUI is flat and instant.
- A Yes/No prompt guards an effect the user cannot take back — and says which, here.
- A dialog is opened with
exec(). "Do something" stays distinct from "edit something". - The application installs the tool's style (
gui/style.py): Fusion, one scrollbar look. - A dialog subclasses
gui.dialog.Dialog, neverQDialog— that is where policy lives. - Only a listed class steps frames on a timer; every other surface asks the frame widget.
- A widget that zooms on the wheel uses the shared zoom (
gui/zoom.py), or is listed. - A cell built from a number uses
num_cell, so its column sorts numerically. - A setup checklist step's tick is read from a signal, never written as a literal.
- Panes side by side are a
GripSplitter— no bareQSplitteris built anywhere in the GUI. - Every
GripSplitteris restored from and saved to its key — each file callsremember()once per split it builds.
Page¶
- Put a page's New / Add / Import action above the list it fills, never below it.
- 1 exempt:
MetadataPage.<MetadataPage>(Import CSV is one button in a mode toolbar — Edit / Save / Cancel / Add column / Delete column / Import / Export — that operates on the table as a whole rather than adding a row to it. The recordings are already there; the CSV fills their columns. Lifting Import out of that row would separate it from Export, which is not a create action by any reading, and leave a toolbar split across the table for one word in one label.)
- 1 exempt:
Scrollbar¶
- A scrollbar has no arrow buttons: one look for every bar in the tool, the handle over the
Splitter¶
- A splitter divides panes side by side; a vertical stack is
CollapsibleBands with drag bars. - No pane drags to zero width: it stops at its minimum, or — a side panel — shuts to a strip with its name on it.
Table¶
- A table displays unless it says otherwise —
EDITOR_PROPERTYis how it says so. - A table whose rows open a page shows a pointing hand over them.
- A table with no row action shows the ordinary cursor — the hand is a promise.
- A table's height comes from
tables.fit_table_height, unless it is meant to fill.
Video¶
- A video surface that plays does it from one control that both starts and stops.
- A video surface that plays offers speeds both slower and faster than 1x.
- Every video surface moves one frame back and one frame forward, however it plays.
- A player's controls sit directly under its picture, not at the bottom of whatever pane
- A player's controls are as wide as its picture draws, not as wide as the window.
- A player's controls are never shorter than they need at their width — clipped is never
Written down, not yet enforced everywhere¶
These are in the guidelines and are not checked over every subject — a spot-check on one or two instances, a source scan, or nothing at all. The list only shrinks.
- A folder's page summarises its contents — needs a predicate for 'summary, not a duplicate'
- A table beside a player is selection-driven, not navigable — spot-checked
- A widget declares the floor its own contents need — spot-checked
- Credential surfaces offer a way out — one surface exists; a rule needs a second
- Forms: QFormLayout, tab/enter/esc — no predicate yet
- Navigable tables signal a clickable row — half done: the pointing-hand half of the cue is swept by
a_table_whose_rows_open_something_says_soand its pair. The trailing›column is checked at four call sites and nowhere sweeps it - One launch surface per module — a registry sweep, not a widget rule — and genuinely unwritten.
test_module_config_widget_buildsproves every module has a config widget; nothing asserts it has only one surface, which is what the rule says - Pages top-justify — test_page_body_space.py + layout_checks.py cover several, not all