aethersdr / aethersdr/AetherSDR

CW Phone/CW panel — Breakin/Iambic/Hold Dly/Pitch row is compressed when docked

Open
#5,718 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug CW good first issue GUI maintainer-review priority: low
Dominant language
C++
Stars
221
Forks
117
Avg merge
2d 9h
Merged PRs (30d)
302

Description

Report preparation
  • I used the AI-assisted bug report tool (Help → Support → File an Issue)
  • I have attached a support bundle or log file
What happened?

There is a UI layout problem with the bottom control row of the CW portion of the Phone/CW panel.

The affected row contains:

  • Breakin
  • Iambic
  • Hold Dly
  • Pitch: and its pitch decrement/value/increment controls

When the Phone/CW panel is placed in the standard docked layout, with the panadapter/waterfall on the left and the control panes docked on the right, this row becomes horizontally over-compressed.

As a result, the text in the buttons is cut off/compressed and the controls no longer have enough horizontal space to render normally.

Importantly, this appears to be dependent on the panel's docking/layout geometry:

  • Docked: the row is compressed and text is clipped.
  • Undocked: the row displays normally.

The other controls in the CW panel do not exhibit the same obvious problem. This suggests that the issue is related to the minimum/preferred width calculation or layout behavior of this particular QHBoxLayout when the Phone/CW applet is constrained to the width available in the right-hand dock.

This issue occurs at multiple UI scales.

Developer Notes

The affected UI is implemented in:

src/gui/PhoneCwApplet.cpp

specifically:

PhoneCwApplet::buildCwPanel()

The affected row is explicitly identified in the source as:

// ── Bottom row: Breakin, Iambic, Pitch stepper ──────────────────────

The relevant code is approximately lines 765–872 in the current main branch.

The row is constructed as a QHBoxLayout:

auto* row = new QHBoxLayout;
row->setSpacing(4);

It then adds three buttons without explicitly constraining their widths:

m_breakinBtn = new QPushButton("Breakin");
m_breakinBtn->setCheckable(true);
m_breakinBtn->setFixedHeight(22);
row->addWidget(m_breakinBtn);

m_iambicBtn = new QPushButton("Iambic");
m_iambicBtn->setCheckable(true);
m_iambicBtn->setFixedHeight(22);
row->addWidget(m_iambicBtn);

m_holdDelayBtn = new QPushButton("Hold Dly");
m_holdDelayBtn->setCheckable(true);
m_holdDelayBtn->setFixedHeight(22);
row->addWidget(m_holdDelayBtn);

After those controls, the layout adds a stretch:

row->addStretch();

followed by the pitch controls:

auto* pitchLbl = new QLabel("Pitch:");
row->addWidget(pitchLbl);

m_pitchDown = new CwTriBtn(CwTriBtn::Left);
row->addWidget(m_pitchDown);

m_pitchEdit = new QLineEdit("600");
m_pitchEdit->setFixedWidth(48);
row->addWidget(m_pitchEdit);

m_pitchUp = new CwTriBtn(CwTriBtn::Right);
row->addWidget(m_pitchUp);

The pitch arrow buttons are themselves fixed at 22 × 22 pixels by CwTriBtn, while the pitch edit is fixed at 48 pixels wide.

Likely cause

The most likely area to investigate is the minimum/preferred width calculation of this bottom QHBoxLayout when the Phone/CW applet is hosted in the constrained right-side dock.

The row contains several controls whose contents require a minimum amount of horizontal space, followed by:

row->addStretch();

The stretch absorbs excess space when available, but there is no explicit minimum or fixed width applied to the three text buttons.

This is potentially significant because the Phone/CW applet itself is declared with:

setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);

in the PhoneCwApplet constructor.

The CW panel also establishes its own margins and spacing:

auto* vbox = new QVBoxLayout(m_cwPanel);
vbox->setContentsMargins(4, 2, 4, 6);
vbox->setSpacing(4);

The combination of the constrained dock width, the row's preferred/minimum sizing, the stretch before the Pitch controls, and the natural size requirements of the text buttons is therefore worth examining.

A useful diagnostic would be to inspect the runtime geometry and sizeHint() / minimumSizeHint() of:

m_breakinBtn
m_iambicBtn
m_holdDelayBtn
pitchLbl
m_pitchDown
m_pitchEdit
m_pitchUp

as well as the affected QHBoxLayout and m_cwPanel when:

  1. the Phone/CW panel is docked in the right-hand pane, and
  2. the same panel is undocked.

The fact that the problem disappears when undocked strongly suggests that the child controls themselves are functioning correctly and that the issue is triggered by the available width supplied by the dock layout.

Related source code

The CW panel is created by:

src/gui/PhoneCwApplet.cpp
    PhoneCwApplet::buildCwPanel()

The overall applet is created in the same file:

PhoneCwApplet::PhoneCwApplet()

where the widget uses:

setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);

and places the Phone/CW panels inside a QStackedWidget.

The CW/Phone mode switch is handled by:

PhoneCwApplet::setMode()

which selects the CW panel using:

m_stack->setCurrentIndex(isCw ? 1 : 0);

This makes the CW panel's own layout the more likely starting point than any radio protocol or model code.

Logging / diagnostic data

This appears to be a GUI geometry/layout issue, so SmartSDR command or status logging is unlikely to be directly relevant.

If diagnostic information is collected through Help → Support, the support bundle is preferable. The Support implementation automatically records the application version, Qt version, OS, connected radio model, firmware, and protocol version.

The Support code also provides the normal logging controls through LogManager. For this particular issue, I would avoid enabling every protocol category unless requested by a developer; the most useful evidence is likely to be:

  • the screenshot showing the compressed docked layout
  • a screenshot of the same panel undocked for comparison
  • the generated Support Bundle
  • the exact window/dock configuration in which the problem occurs

Because the defect is specifically dependent on docked versus undocked geometry, a developer diagnostic that reports widget/layout geometries in both states would likely be more valuable than additional radio protocol logging.

Potential fix direction

No specific fix should be assumed from the report, but likely approaches to investigate include:

  • ensuring the three text buttons have appropriate minimum widths;
  • allowing the Pitch controls to participate more intelligently in width negotiation;
  • reviewing whether row->addStretch() is appropriate for this constrained layout;
  • allowing the row to redistribute space before text-bearing buttons are compressed;
  • or otherwise adjusting the row's size-policy/minimum-size behavior so that the docked Phone/CW panel requests enough width to display its controls.

The important behavioral requirement is that the docked CW panel must not render the Breakin, Iambic, or Hold Dly controls with clipped text merely because the right-side pane is narrower than the undocked window.

This is a UI/layout issue only; there is no indication from the observed behavior that the FLEX-8400 firmware, SmartSDR protocol, or CW control logic is malfunctioning.

What did you expect?
The CW Phone/CW panel should maintain a usable layout when docked in the standard configuration.

The Breakin, Iambic, and Hold Dly buttons should retain enough width for their labels to be displayed completely, and the Pitch: controls should remain fully visible.

The docked and undocked versions should use the available space appropriately without clipping button text.

If the available width becomes too small, the layout should adapt gracefully rather than allowing the button contents to become visibly truncated.

Steps to reproduce
  1. Launch AetherSDR on macOS.

  2. Connect to a FLEX-8400 running firmware 4.2.20.41343.

  3. Switch the active mode to CW so that the CW portion of the Phone/CW panel is displayed.

  4. Arrange the AetherSDR window in the standard layout with:

    • panadapter/waterfall on the left
    • control panes docked on the right
  5. Locate the bottom row of the CW Phone/CW panel containing:

    • Breakin
    • Iambic
    • Hold Dly
    • Pitch: with its spinner controls
  6. Observe that the row is horizontally compressed and the button text is clipped.

  7. Undock the Phone/CW panel.

  8. Observe that the same row displays normally when the panel is undocked.

Image
AetherSDR version

26.9.3

Radio model & firmware

FLEX-8400 running firmware 4.2.20.41343

Operating system

macOS

OS version and hardware

26.6.2 Studio M2 Mac

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/gui/PhoneCwApplet.cpp, especially PhoneCwApplet::buildCwPanel() around the bottom-row QHBoxLayout, then compare the listed widget and layout geometries in docked and undocked states. Inspect the applet constructor and setMode() only as needed to understand the hosting layout. Done means the docked CW panel keeps Breakin, Iambic, Hold Dly, and the Pitch controls fully visible without clipped text.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
76/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.