Skip to content

cleanup(theme): swap hardcoded #006040 in kGreenToggle for color.background.success token #3141

Description

@ten9876

Background

PR #3131 (SmartCAT, by @K5PTB) tokenized the CAT control applet's stylesheets but left one literal hex value behind, with a comment noting that no matching token existed at the time.

Since then, PR #3130 (Theme Editor) added color.background.success to both bundled themes:

  • default-dark.json: "success": "#006040"
  • default-light.json: "success": "#c8e8d0"

The #006040 literal in src/gui/CatControlApplet.cpp (the kGreenToggle stylesheet, :checked rule) is bit-identical to the new dark token, so the swap is mechanical and visually-identical on the dark theme — and gives the light theme a proper soft-mint background instead of the unreadable saturated green.

The change

// 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}}; }";

Also drop the stale comment block:

// Remove this:
// "(there is no dark-success-background token) so they stay hardcoded."

Acceptance

  • #006040 literal removed from kGreenToggle in CatControlApplet.cpp
  • Stale "no dark-success-background token" comment removed
  • Dark theme renders identically (pixel comparison: button :checked state)
  • Light theme :checked button is now legible (was unreadable dark green on light bg)

Why now

Trivial follow-up to PR #3131 — the prerequisite token landed in PR #3130 the same day.

73, Jeremy KK7GWY & Claude (AI dev partner)

Metadata

Metadata

Assignees

No one assigned

    Labels

    GUIUser interfaceenhancementImprovement to existing featuregood first issueGood for newcomersmaintainer-reviewRequires maintainer review before any action is taken

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions