polyfoammesh.gui.design_tokens
Design tokens for PolyFoamMesh (commercial-grade).
This module is the single source of truth for all visual values used by the GUI. It is consumed by:
the in-app theme.py (palette + font + QSS for the running QApplication)
the legacy style.py (lightweight helpers: status_pill, metric_label)
any new widget that needs brand colors, spacing, or font sizes.
- Design contract:
Never hardcode a color, spacing, or font size in widget code. Import from here.
All values are immutable strings; do not mutate at runtime.
For a “rebrand”, change values here and reload via theme.apply(app).
Tokens follow the W3C Design Token Community Group format and mirror .ui-design/design-system.json one-to-one. If you add a token, add it to both places.