validate.gui.theme#

Dark theme, with an accent color nodding to CERR ROE’s teal (cerr/CERR_core/PlanAnalysis/ROE.m: figColor [.6 .75 .75]).

Design principles applied:
  • Contrast: light text on dark surfaces (~13:1), muted secondary text for de-emphasis (placeholders, disabled controls) without hiding it.

  • Consistency: one spacing unit (4px) and one corner radius (4px) reused throughout; identical treatment for all buttons/inputs/tables.

  • Hierarchy: primary actions (Run, Next) are filled teal; the other buttons are gray. Sections are separated by space rather than boxes, with small, muted, uppercase titles; the selected tab is raised and underlined in teal.

  • Legibility: font sizes scale from the platform’s default font (13pt on macOS, ~9-10pt on Linux/Windows, where Qt maps points to pixels differently), with a 10pt floor, since smaller defaults read small.

Functions

apply(app)

Apply the dark theme + base font size application-wide.

divider()

A thin horizontal line between sections.

headingFont(widget)

Bold, slightly larger font for a section-heading QLabel.

markPrimary(button)

Style a QPushButton as the primary (accent-colored) action.

palette()

section(title)

A section: a QGroupBox with an uppercase title (Qt stylesheets can't transform text), and its QVBoxLayout at the theme's row spacing.

styleSheet(groupTitleSize)

The app stylesheet, with group titles at groupTitleSize (pt).

tabFont(widget)

The tab bar's font: a step up from body text, and semibold, the selected tab's weight, so Qt sizes the tabs to fit it (TAB_BAR_STYLE sets the others' weight).

validate.gui.theme.styleSheet(groupTitleSize)[source]#

The app stylesheet, with group titles at groupTitleSize (pt).

validate.gui.theme.palette()[source]#
validate.gui.theme.apply(app)[source]#

Apply the dark theme + base font size application-wide.

The base size is the platform’s default font size, at least MIN_BASE_POINT_SIZE.

validate.gui.theme.headingFont(widget)[source]#

Bold, slightly larger font for a section-heading QLabel.

validate.gui.theme.tabFont(widget)[source]#

The tab bar’s font: a step up from body text, and semibold, the selected tab’s weight, so Qt sizes the tabs to fit it (TAB_BAR_STYLE sets the others’ weight).

validate.gui.theme.section(title)[source]#

A section: a QGroupBox with an uppercase title (Qt stylesheets can’t transform text), and its QVBoxLayout at the theme’s row spacing.

validate.gui.theme.divider()[source]#

A thin horizontal line between sections.

validate.gui.theme.markPrimary(button)[source]#

Style a QPushButton as the primary (accent-colored) action.