You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-up to #3439 (merged as 8679cdb). Surfaced during review — the FreeDV Reporter dialog itself uses ThemeManager tokens (`{{color.background.0}}`, `{{color.text.primary}}`, etc.) throughout, but the row-highlight backgrounds in `FreeDvReporterModel.cpp` are still three hardcoded `QColor` constants.
These drive the row `Qt::BackgroundRole` when a station is actively transmitting (`kTxBg`), recently RX'd (`kRxBg`, fades after a timeout), or has a recent message (`kMsgBg`, fades after a timeout).
Why migrate
Theme consistency. Every other surface in the dialog already pulls from ThemeManager — these three constants are the only chrome that doesn't follow the active theme. A future light-mode or high-contrast theme would render the rest of the dialog correctly while leaving these three rows looking off.
The TX token already exists. `ThemeManager` already exposes `color.background.tx` (a TX-state background token used elsewhere in the chrome). `kTxBg` should consume that token; if the resolved value differs from `#fc4500`, that's a theme inconsistency worth resolving in the token, not in this file.
Consume it. If the resolved value differs, fix the token, not the file.
`kRxBg`
`#379baf` teal
❌ No `color.background.rx` yet
Add a new token. Suggested: `color.background.rx` (mirrors `.tx` naming).
`kMsgBg`
`#e58be5` purple
❌ No semantic token for "message"
Add a new token. Suggested: `color.background.message` or `color.accent.message`.
Migration sketch
Add the two missing tokens (`color.background.rx`, `color.background.message`) to ThemeManager's theme JSON files for each active theme variant.
Replace the three `QColor` constants with calls to `ThemeManager::instance().resolveColor(...)` (or whatever the consuming API is for non-stylesheet contexts — TableView background roles are returned as `QVariant` from `data()`, not painted via stylesheets, so this needs the C++ accessor not the `{{token}}` substitution).
Verify the highlight expiration tick (`onHighlightTick` at `FreeDvReporterModel.cpp`) still re-renders the row when the resolved color changes — should be automatic via the existing `dataChanged` emit.
Scope notes
Out of scope: any other model files in `src/gui/` that may have similar hardcoded highlight colors. If grep finds them while touching the theme JSON, separate issue.
Out of scope: the dialog's existing `{{color.*}}` token usage — that's already correct.
Test plan
Build clean on all three platforms.
Visual parity check: open FreeDV Reporter, trigger a TX (other station), an RX, and a message, confirm the three highlight backgrounds render at the resolved colors.
Theme switch test (if the project has multiple themes wired up): switch theme, confirm highlights change.
Follow-up to #3439 (merged as 8679cdb). Surfaced during review — the FreeDV Reporter dialog itself uses ThemeManager tokens (`{{color.background.0}}`, `{{color.text.primary}}`, etc.) throughout, but the row-highlight backgrounds in `FreeDvReporterModel.cpp` are still three hardcoded `QColor` constants.
The hardcoded constants
`src/gui/FreeDvReporterModel.cpp:18-20`:
```cpp
const QColor kTxBg {0xfc, 0x45, 0x00}; // orange (#fc4500)
const QColor kRxBg {0x37, 0x9b, 0xaf}; // teal (#379baf)
const QColor kMsgBg{0xe5, 0x8b, 0xe5}; // purple (#e58be5)
```
These drive the row `Qt::BackgroundRole` when a station is actively transmitting (`kTxBg`), recently RX'd (`kRxBg`, fades after a timeout), or has a recent message (`kMsgBg`, fades after a timeout).
Why migrate
Existing tokens vs new tokens needed
Migration sketch
Scope notes
Test plan
Refs #3439