Skip to content

Readable results in dark mode, and an About page with licence, source and attribution - #10

Merged
Boernsman merged 1 commit into
mainfrom
fix/dark-mode-and-about
Aug 27, 2026
Merged

Boernsman merged 1 commit into
mainfrom
fix/dark-mode-and-about

Conversation

@Boernsman

Copy link
Copy Markdown
Contributor

Dark mode

The results table set only a background colour, and those colours were picked for a light theme. Under a dark theme the row stayed pale while the theme's text turned near-white, leaving the verdict column — the column an operator scans — barely legible.

ResultsTableModel now states both the background and the text, both chosen for the active colour scheme, and repaints on colorSchemeChanged and on ApplicationPaletteChange. The scheme is read from the palette rather than the style hint, because the palette is what actually gets painted. The verified-point green on the plot was dim on a dark background and gets the same treatment.

Results table in dark mode

About PeakEmi

A dialog of its own instead of QMessageBox::about, carrying the licence (GPL-3.0-or-later, linked), a link to the source repository, "Developed by Bitcrush Testing", and the CON-1 pre-compliance notice. It is a dialog because the links have to be clickable and readable: several desktop dark themes leave QPalette::Link at its light-theme navy, which all but disappears on a dark window, so the dialog sets its own link colour.

The application icon becomes a compiled-in Qt resource, so the About page and the window icon work the same on every platform and in every packaging.

About dialog

Tests

  • Every verdict, in both colour schemes, must clear the WCAG AA contrast ratio of 4.5 for its background and text. Checked against the previous code: it fails, because no foreground was set at all.
  • The About page carries the licence, both links, the attribution and the disclaimer, and its link colour clears the same contrast threshold.
  • The icon resource resolves — verified non-vacuous by pointing it at a missing path and watching the assertion fail.

Verified locally

Debug and release builds, and a build with PEAKEMI_WITH_USBTMC/VISA/PYTHON off (NFR-BLD-5); 14/14 tests in each; clang-format 20 clean; a GCC 16/libstdc++ syntax sweep with the CI warning set clean; a clang-tidy 20 sweep over every translation unit with 0 parse failures and 0 error-level findings.

@Boernsman
Boernsman force-pushed the fix/dark-mode-and-about branch from 66c33fb to 5923e77 Compare August 26, 2026 21:28
The results table set only a background colour, chosen for a light theme.
Under a dark theme the row stayed pale while the theme's text turned
near-white, so the verdict column -- the column an operator scans -- was
barely legible. The model now states both the background and the text, both
picked from the active colour scheme, and repaints when the scheme or the
application palette changes. The verified-point green on the plot gets the
same treatment.

About PeakEmi becomes a dialog of its own instead of a QMessageBox, carrying
the licence (GPL-3.0-or-later, with a link to it), a link to the source
repository, "Developed by Bitcrush Testing", and the CON-1 pre-compliance
notice. Its links need to be clickable and readable, which is why it is a
dialog: several dark themes leave QPalette::Link at a navy that vanishes on a
dark window, so the dialog sets its own.

The application icon becomes a compiled-in resource, so the About page and
the window icon work the same on every platform and in every packaging.

Tests assert a WCAG AA contrast ratio for every verdict in both colour
schemes, that the About page carries the licence, source and attribution, and
that the icon resource actually resolves.

The screenshot tool grows a --dark flag and captures the About dialog, and
the README shows the results table in dark mode.

CONTRIBUTING gains the Qt version difference that made the first push red:
the tree builds with QT_NO_CAST_FROM_ASCII, and QString::arg("text") compiles
against 6.10 but not against the 6.8 minimum CI builds with.
@Boernsman
Boernsman force-pushed the fix/dark-mode-and-about branch from 5923e77 to 9aa41c5 Compare August 27, 2026 11:55
@Boernsman
Boernsman merged commit ae1604e into main Aug 27, 2026
4 checks passed
@Boernsman
Boernsman deleted the fix/dark-mode-and-about branch September 4, 2026 06:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant