Skip to content

Commit 1fdc033

Browse files
nigelfentonclaude
andauthored
cleanup(theme): swap kGreenToggle #006040 for color.background.success (#3141) (#3195)
Closes #3141. ## Summary Mechanical token swap in `CatControlApplet.cpp::kGreenToggle`: - `background: #006040` → `background: {{color.background.success}}` - Stale comment block about "no dark-success-background token" removed (the token landed in PR #3130 alongside the Theme Editor work). ## Why The literal `#006040` was bit-identical to the new dark token `color.background.success`, so the swap is visually-identical on Default Dark. The original concern was light theme: the hardcoded saturated dark-green on a light surround was unreadable. With the token, light theme now resolves to the soft mint `#c8e8d0` defined in `default-light.json`. ## Diff ```cpp // Before "QPushButton:checked { background: #006040; color: {{color.accent.success}}; " "border: 1px solid {{color.accent.success}}; }"; // After "QPushButton:checked { background: {{color.background.success}}; " "color: {{color.accent.success}}; " "border: 1px solid {{color.accent.success}}; }"; ``` ## Verification Built on Windows 11 (MSVC + Ninja + Qt 6) on top of `aethersdr/AetherSDR` main at `9f3f1c4c`. Smoke-tested both docked and floating CAT Control variants in both bundled themes: | Theme | Variant | `:checked` background | Result | | --- | --- | --- | --- | | Default Dark | docked | `#006040` (token resolves to bit-identical value) | unchanged ✓ | | Default Dark | floating pop-out | `#006040` | unchanged ✓ | | Default Light | docked | `#c8e8d0` soft mint | legible ✓ | | Default Light | floating pop-out | `#c8e8d0` | legible ✓ | Screenshots of dark `:checked` (proof of pixel-identical regression) and light `:checked` (the legibility fix) available — happy to attach to the description in a follow-up commit comment. ## Acceptance checklist (from #3141) - [x] `#006040` literal removed from `kGreenToggle` in `CatControlApplet.cpp` - [x] Stale "no dark-success-background token" comment removed - [x] Dark theme renders identically (token is bit-identical) - [x] Light theme `:checked` button is now legible cc @ten9876 @jensenpat 73 Nigel G0JKN 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent adcbd17 commit 1fdc033

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/gui/CatControlApplet.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,13 @@ namespace {
2424

2525
// Stylesheet templates — tokens are resolved at runtime by ThemeManager.
2626
// Use ThemeManager::applyStyleSheet(widget, kXxx) so widgets re-style automatically
27-
// on theme changes. The :checked colours on kGreenToggle have no matching token
28-
// (there is no dark-success-background token) so they stay hardcoded.
27+
// on theme changes.
2928

3029
const char* kGreenToggle =
3130
"QPushButton { background: {{color.background.1}}; border: 1px solid {{color.background.2}}; border-radius: 3px;"
3231
" color: {{color.text.primary}}; font-size: 11px; font-weight: bold; padding: 2px 8px; }"
3332
"QPushButton:hover { background: {{color.background.2}}; }"
34-
"QPushButton:checked { background: #006040; color: {{color.accent.success}}; border: 1px solid {{color.accent.success}}; }";
33+
"QPushButton:checked { background: {{color.background.success}}; color: {{color.accent.success}}; border: 1px solid {{color.accent.success}}; }";
3534

3635
const char* kHintBtn =
3736
"QPushButton { background: transparent; border: none; color: {{color.text.label}};"

0 commit comments

Comments
 (0)