Skip to content

fix: give the idle MOX button a distinct accent color so it reads as the transmit button#3763

Merged
ten9876 merged 1 commit into
aethersdr:mainfrom
mvanhorn:fix/3663-idle-mox-accent-color
Jun 23, 2026
Merged

fix: give the idle MOX button a distinct accent color so it reads as the transmit button#3763
ten9876 merged 1 commit into
aethersdr:mainfrom
mvanhorn:fix/3663-idle-mox-accent-color

Conversation

@mvanhorn

Copy link
Copy Markdown
Contributor

Summary

Gives the idle MOX button a distinct amber accent border and text so it reads as the primary transmit control, instead of sharing the neutral blue btnStyle with its TUNE / ATU / MEM neighbors. Before this change the MOX button only became visually distinct (solid red) while transmitting; at idle it was indistinguishable from the other three buttons. The change touches only src/gui/TxApplet.cpp in two MOX-specific spots: the idle style at button construction now uses a dedicated moxIdleStyle (amber border #d08020 / amber text #f0c890), and the non-transmitting branch of the moxChanged handler reverts MOX to that same amber accent rather than the neutral blue style. The solid-red active-TX appearance, the other three buttons, and all model/protocol paths are unchanged.

The issue also floated an optional "customize applet buttons" idea; that is a larger separate theming feature and is intentionally out of scope here.

Refs #3663

Constitution principle honored

Principle VI — AetherSDR Never Transmits Without Operator Intent: this is an appearance-only change with no effect on transmit keying or interlock state. Principle IV — Every Contribution Is Clean-Room: the new stylesheet is original, not derived from any proprietary binary.

Test plan

  • Local build passes (cmake --build build) — CSS-string-only change in one file; the new moxIdleStyle C-string literal is well-formed and consumed on the next line.
  • Behavior verified on a real radio if applicable — visual styling only; no radio required.
  • Existing tests pass (CI)
  • Reproduction steps documented if user-reported bug — at idle the MOX button now renders with its amber accent, visually separable from TUNE/ATU/MEM; pressing MOX shows the existing solid red; releasing TX returns it to the amber idle style.

Checklist

  • Commits are signed (docs/COMMIT-SIGNING.md)
  • No new flat-key AppSettings calls — use nested-JSON-under-one-key (Principle V)
  • Code is clean-room — not decompiled, disassembled, or reverse-engineered from a proprietary binary (Principle IV)
  • All meter UI uses MeterSmoother (AGENTS.md convention) — n/a, no meter UI touched
  • Documentation updated if user-visible behavior changed — no docs cover per-button styling
  • Security-sensitive changes reference a GHSA if applicable — n/a

AI was used for assistance.

The MOX button shared the neutral blue btnStyle with TUNE/ATU/MEM at
idle, so it was visually indistinguishable from its neighbors even
though it is the primary manual-transmit control. Give the idle MOX
button its own amber accent border/text at construction and in the
non-transmitting branch of the moxChanged handler. The solid-red
active-TX appearance and the other three buttons are unchanged.

Refs aethersdr#3663
@mvanhorn mvanhorn requested a review from a team as a code owner June 23, 2026 06:51
@mvanhorn mvanhorn mentioned this pull request Jun 23, 2026
2 tasks

@aethersdr-agent aethersdr-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mvanhorn — this is a clean, well-scoped change. I traced both MOX styling sites in the base file and they're exactly the two you touched:

  • buildUI() construction (was btnStyle → now moxIdleStyle)
  • the moxChanged handler's non-TX branch (blue #205070 → amber #d08020)

There's no third reset path, so the idle MOX button reliably renders amber in both the initial and post-TX-release states, and the solid-red active branch plus the TUNE/ATU/MEM neighbors are untouched. The amber idle and red active stylesheets stay byte-identical between the two sites, which is what keeps the toggle visually consistent. No transmit-keying, model, or protocol behavior is affected, consistent with the Principle VI note.

Conventions and safety all check out: no AppSettings/QSettings involvement, no new allocations or ownership, no null-deref or boundary concerns (pure stylesheet strings). Nothing here is outside the stated scope.

Two optional, non-blocking notes:

  1. Duplicated literal. The amber idle stylesheet now appears verbatim in both spots. If they ever drift, the idle/post-TX appearance would diverge silently. A shared static const char* (or member) would make that impossible. That said, this matches the file's existing pattern — the red active style is already inlined in two places — so it's fine to leave as-is for a fix this small.

  2. Hardcoded vs. themeable. These colors are literal hex rather than ThemeManager color.* tokens (cf. the APD button just below at m_apdBtn, and the token work in #3761). Again, the whole btnStyle block is hardcoded today, so you're correctly matching the surrounding code — just flagging that a future theming pass would likely want a color.transmit.*-style token here.

Neither blocks merge. Nice incremental UX fix.


🤖 aethersdr-agent · cost: $2.6664 · model: claude-opus-4-8

@ten9876 ten9876 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean, correct, well-scoped UX fix — the idle MOX button now reads as the primary transmit control instead of blending with TUNE/ATU/MEM. Verified both MOX styling sites are the only ones touched, active-TX red and the neighbor buttons unchanged, no keying/model effect (Principle VI holds). CI fully green.

Follow-up: I'll tokenize the MOX accent (color.tx.mox.*) so it becomes independently editable in the Theme Editor, mirroring the waterfall LIVE chip (#3761) — keeping that out of this fork PR's scope. Thanks @mvanhorn!

@ten9876 ten9876 merged commit e83dc31 into aethersdr:main Jun 23, 2026
6 checks passed
ten9876 added a commit that referenced this pull request Jun 23, 2026
…) (#3768)

## Summary

Follow-up to #3763, mirroring the waterfall LIVE chip (#3761). #3763
gave the idle MOX button a distinct amber accent so it reads as the
primary transmit control — but with hardcoded hex literals duplicated
across its two styling sites. This tokenizes that accent behind
dedicated `color.tx.mox.*` tokens so it becomes **editable in the Theme
Editor**:

| Token | Default | Role |
|---|---|---|
| `color.tx.mox.border` | `#d08020` | idle amber border |
| `color.tx.mox.text` | `#f0c890` | idle amber text |
| `color.tx.mox.border.hover` | `#e09030` | hover border |
| `color.tx.mox.text.hover` | `#ffd8a0` | hover text |

### What changed

- Both MOX styling sites (construction + the `moxChanged` return-to-idle
branch) now share a single `kMoxIdleStyle` template via
`ThemeManager::applyStyleSheet()`, which also removes the
**duplicated-literal drift risk** the #3763 review flagged.
- The **active-TX red branch** is converted from `setStyleSheet()` to
`applyStyleSheet()` as well. Its template stays byte-identical literal
hex, but routing it through the tracked path fixes a latent bug: a Theme
Editor recolor *mid-transmit* would otherwise re-resolve the stale idle
template over the active red. (The TUNE button already uses
`applyStyleSheet` for both states for exactly this reason.)
- Seed defaults (`ThemeManager::seedBuiltinDefaults`) and **both**
preset JSONs carry the same literal values the buttons used before. The
buttons don't respond to theme today (hardcoded hex), so seeding both
presets identically preserves the rendered appearance exactly — only the
editability is new.

Background / hover-background / disabled colors stay literal
(structural, shared with the neutral TUNE/ATU/MEM `btnStyle`); only the
amber **accent** that defines MOX's identity is tokenized — the same
focused scope as #3761.

## Constitution

- **Principle VI** — appearance-only; no transmit-keying, interlock, or
model path touched.
- **Principle IV** — tokens and templates are original.

## Test plan

- [x] Local build passes (`cmake --build build --target AetherSDR`)
- [x] Both preset JSONs validate (`json.load`)
- [ ] Visual: idle MOX renders amber identically to #3763; pressing MOX
still shows solid red; releasing returns to amber; recoloring
`color.tx.mox.border` in the Theme Editor moves only the MOX accent (and
updates live, including while transmitting)

Refs #3663. Follows #3763, #3761.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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.

2 participants