Repository navigation
Fix compact RX preset sizing on Linux. Principle XI. - #6643
Conversation
Keep the 248 px dock and minimum 60 px AGC-T slider by reducing only the preset buttons horizontal padding. Add font-specific geometry and label-fit checks, and refresh the RX controls guide and screenshot. Fixes aethersdr#6641.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
ten9876
left a comment
There was a problem hiding this comment.
Review of #6643 at e6d541b6, against #6641
Issue fit. Yes. #6641's acceptance criteria are all met:
- the dock stays 248 px;
- the AGC-T slider keeps at least 60 px (63 px after the fix);
- every control stays visible;
- the focused GUI test passes under DejaVu Sans;
- the width assertion stays.
The fix is the smallest one available. It cuts only the preset buttons' horizontal padding from 2 px to 1 px. Vertical padding stays 1 px, because kButtonBase() at src/gui/RxApplet.cpp:196 is padding: 1px 2px. Nothing else in the applet changes.
Scope
| File | Claimed? | Verdict |
|---|---|---|
src/gui/RxApplet.cpp:3551-3554 |
Yes, the fix | In scope |
tests/auto_agc_threshold_gui_test.cpp (compactLayoutFitsDock, three font rows) |
Yes | In scope |
docs/user/static/img/screens/rx-applet.png |
Yes, refreshed screenshot (same 413×325) | In scope |
docs/user/docs/rx-controls.md:60-61 |
Yes | In scope, see nit 3 |
Merge commit e6d541b69 |
Disclosed | Folded away by the squash |
Everything in the diff is explained by the issue. There's no new public surface, no removed guard and no CHANGELOG.md entry. This is a layout fix for a reproduced defect, not a preference change.
Blockers
None.
Nits (non-blocking)
tests/auto_agc_threshold_gui_test.cpp:337-346: the test only pins the fix on hosts that have DejaVu Sans.- On this box DejaVu isn't installed system-wide. The rows are then
systemandLiberation Sans, and with the padding change reverted both still pass. - Only a fontconfig that supplies DejaVu turns the test red without the fix. CI's image does have it, which is how #6641 was found, so CI coverage is real.
- Consider a one-line comment saying the DejaVu row is the one that pins the fix, so a later font-image change that drops it is noticed.
- On this box DejaVu isn't installed system-wide. The rows are then
tests/auto_agc_threshold_gui_test.cpp:370: the failure message can be empty.QVERIFY2(..., qPrintable(widget->accessibleName()))names the widget by its accessible name, which many children don't have. A fallback makes a containment failure readable:QVERIFY2(fixture.rx.rect().contains(bounds), qPrintable(widget->accessibleName().isEmpty() ? QString::fromLatin1(widget->metaObject()->className()) : widget->accessibleName()));
docs/user/docs/rx-controls.md:60-61: the new sentence describes the layout, not what the user does with it. "The compact preset buttons keep the AGC-T slider and A button visible…" reads as an implementation note. I'd drop it; the refreshed screenshot already shows the result. This is your call.
What I verified, and what held up
- The fix. I built
auto_agc_threshold_gui_testand the app at the head. This used a lean shared-core build with Qt 6.12, run offscreen.- With a DejaVu-only fontconfig: 16 passed, 0 failed.
- With system fonts: 16 passed.
- The test pins it. With the
padding: 1pxoverride removed, the DejaVu run fails 3 cases:compactLayoutFitsDock(system),compactLayoutFitsDock(DejaVu Sans)andbridgeClickWaitsForConfirmedStatus, each at its widthQCOMPARE. With the override restored, 16/16 pass again. - The merge base. On main I reproduced 251 vs 248 earlier today with the same DejaVu fontconfig (while working on #6637).
- Other modes. The test only exercises USB presets. I drove the head build against the demo radio (
DEMO-0001, isolated settings, offscreen, TX disabled) under DejaVu Sans. I set each mode withslice modeand read the RX applet's widget tree withdumpTree.- USB, LSB, CW, CWR, AM, SAM, FM, NFM, DIGU, DIGL, RTTY and DFM all keep the applet at 248 px, with no visible child past its right edge.
- The widest labels are AM's
5.6K/10K/12K/14K, at 30-31 px buttons. - FM, NFM and DFM show no width presets, and nothing overflows.
- Restyling.
kButtonBase()is resolved once, so a theme change can't restyle the presets back to the old padding.rebuildFilterButtons()is the only place their stylesheet is set. - Not verified. Radio-declared preset labels (
stablePresets, networked Icom) can be longer than Flex's, and the demo can't produce them. Windows and macOS rendering I only read. - CI freshness. CI ran at 01:58Z, before main moved to
6bac6a089(#6645). That commit touches CTR2 code only, notRxAppletor this test.
…ote. Principle XI. compactLayoutFitsDock reported a widget past the applet edge by its accessible name, which most children don't have, so the failure could be an empty message. It now falls back to the class name. A comment marks DejaVu Sans as the row that needs the compact preset padding, so a host without that font is known to run only rows that already fit. The rx-controls.md sentence described the layout rather than anything an operator does. The refreshed screenshot shows the result, so the sentence is removed. auto_agc_threshold_gui_test: 16 passed under a DejaVu-only fontconfig and under the system fonts. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012U8wmr3AQGVrmQLp2zNBwa
ten9876
left a comment
There was a problem hiding this comment.
Approving at c3dbfe090.
The fix. With a DejaVu-only fontconfig, auto_agc_threshold_gui_test passes 16/16, and the compactLayoutFitsDock(DejaVu Sans) row ran. Removing the padding: 1px override (src/gui/RxApplet.cpp:3551-3554) fails 3 cases, both new layout rows among them, each at its 248 px width check. In the demo radio under DejaVu Sans, all 12 modes (USB, LSB, CW, CWR, AM, SAM, FM, NFM, DIGU, DIGL, RTTY, DFM) keep the RX applet at 248 px with no child past its right edge. Details are in review 5600481695.
Review nits, folded in as c3dbfe090:
- A containment failure in
compactLayoutFitsDocknow names the widget's class when it has no accessible name (tests/auto_agc_threshold_gui_test.cpp). This one is checked by compiling and by the green run only; I didn't force a containment failure. - A comment marks DejaVu Sans as the row that needs the compact padding.
- The
rx-controls.mdsentence describing the layout is removed. That was the maintainer's call; the refreshed screenshot stays.
After the push, the test passes 16/16 under both DejaVu and the system fonts, and every required check is green on c3dbfe090.
Not verified: radio-declared preset labels (networked Icom) and Windows/macOS rendering, which I only read. Main has since gained #6637, which touches three unrelated tests and none of this PR's files.
Summary
Fixes #6641. Related to #6508, #6564 and #6637.
With DejaVu Sans on Linux, the three RX preset columns need 103 px. The 136 px AGC row, 4 px column gap and 8 px margins bring the applet minimum to 251 px inside a 248 px dock. The existing GUI test correctly catches the clipped right edge.
Reduce only the presets' horizontal padding from 2 px to 1 px. The dock width, AGC selector, Auto button and slider minimum retain their sizes. Add system/DejaVu Sans/Liberation Sans cases that check width, control containment, label fit and a slider at least 60 px wide. Refresh the RX guide's HiDPI screenshot.
Constitution principle honored
Principle XI — the new font cases fail against the original layout and pass with the fix, using the real production widgets and agent automation dispatcher.
Validation
-O0 -g1 -DNDEBUG. Object debug sections were stripped and static archives placed in temporary RAM storage because of VM resource limits. Tests ran in a separate checkout; the managed checkout and its CWX edits were preserved.npm ciand production docs build pass, including current main's new docs configuration. Registration, frozen CI gate, generated references and 707 Log Analyzer checks pass. Accessibility warnings remain 5 on base/head. The RX screenshot embed is in sync; 14 unrelated existing pages remain out of step.4ef2c18b5changes only documentation/release infrastructure; tested runtime/GUI sources are unchanged. Windows and the complete suite were not run locally; hosted checks are pending.The socket-free fixture uses injected normalized status and the agent automation bridge's production
dumpTree,grab,getandinvokedispatcher. It starts no radio, audio device or listener. Bridge sufficient — no gaps; this is fixture evidence without a live-radio or RF claim.Proof
Linux DejaVu Sans, DPR 1.6667. Standalone production widget before → after: the minimum fits the dock, preserving the AGC slider.
Machine-readable layout measurements
Generated with OpenAI Codex.