Skip to content

fix(live): don't widen the panel for the Snap button; rename live button to Live/Stop - #620

Merged
Alpaca233 merged 1 commit into
Cephla-Lab:masterfrom
Alpaca233:fix/live-snap-panel-width
Aug 24, 2026
Merged

fix(live): don't widen the panel for the Snap button; rename live button to Live/Stop#620
Alpaca233 merged 1 commit into
Cephla-Lab:masterfrom
Alpaca233:fix/live-snap-panel-width

Conversation

@Alpaca233

Copy link
Copy Markdown
Collaborator

Why

The Snap button (#616) stretched the live-control panel through two of row 1's width demands:

  • The Live/Snap pair contributed two full button size hints to the row where the single live button contributed one.
  • The illumination entry's minimum width was set to the sum of the two button hints, and that value is applied as a fixed width to both the intensity entry and the Autolevel button (90px → 160px on the default style).

Since the panel is pinned to its widest row (setFixedWidth(minimumSizeHint)), every other row stretched with it on configs where these demands dominate.

Changes

  • Restore the single-button size hint as the basis for the intensity entry / Autolevel fixed width.
  • Add SingleSlotButtonRow: a small wrapper that lays out N buttons horizontally while advertising the size hints of a single button. Live+Snap live in it, so they fill exactly the slot the old button occupied, split it evenly, and may compress below their individual hints when the panel is squeezed. Row 1 therefore demands no more width than it did before feat(live): add a Snap button for single-frame capture #616, regardless of channel names, fonts, or DPI. The Live Configuration dropdown keeps its stock sizing.
  • Rename the live button: "Start"/"Stop" was ambiguous next to "Snap" (start what?). It now reads "Live" when idle and "Stop" while running.

Verification

Booted the GUI from pre-#616 master (e86a608) and from this branch, same config, and compared:

  • Panel minimum 558px → 556px offscreen (466px → 466px on a HiDPI X11 display); the fixed panel width is identical in both.
  • Pixel diff over the entire controls panel: the only differing region is the 113×25px patch where "Start Live" became "Live | Snap" — every other row is identical to the pixel.
  • Toggle behavior: "Live" → "Stop" and back, Snap disabled while live runs.
  • Widget + GUI-construction tests pass (30), black clean.

One trade-off: at the panel's absolute minimum width the two buttons compress to ~37px each and their labels may elide — the unavoidable cost of fitting two buttons where one fit before; at normal width they render 90px each.

🤖 Generated with Claude Code

…ton to Live/Stop

The Snap button (Cephla-Lab#616) stretched the whole live-control panel through two
of row 1's width demands:
- the Live/Snap pair contributed two full button size hints where the
  single live button contributed one, and
- the illumination entry's minimum was set to the SUM of those two hints,
  which is applied as a fixed width to both the intensity entry and the
  Autolevel button (90px -> 160px).
Every other row stretched with the panel.

Restore the single-button size hint for the intensity entry / Autolevel
fixed width, and wrap Live+Snap in SingleSlotButtonRow, which advertises
the footprint of a single button: the pair fills the slot the old button
occupied and splits it evenly, compressing below the individual button
hints when the panel is squeezed, so row 1 demands no more width than it
did before Cephla-Lab#616 regardless of channel names, fonts, or DPI. The dropdown
keeps its stock sizing.

Offscreen measurement against pre-Cephla-Lab#616: panel minimum 558px -> 556px,
preferred 588px -> 586px, all other rows within 2px of their old
geometry, Live+Snap rendering 90px each in the old button's 186px slot.

Also rename the live button: "Start"/"Stop" was ambiguous next to "Snap"
(start what?), so it now reads "Live" when idle and "Stop" while running.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

Copilot AI 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.

Pull request overview

Prevents the Snap button from widening the live-control panel and clarifies live-mode labeling.

Changes:

  • Adds a single-slot horizontal button container.
  • Restores single-button width calculations.
  • Renames “Start” to “Live.”

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +4226 to +4230
class SingleSlotButtonRow(QWidget):
"""Buttons in a row that together advertise the footprint of a single button.

Lets several buttons take over a layout slot one button used to occupy
without adding to the panel's minimum or preferred width: the row's size
@Alpaca233
Alpaca233 merged commit f9305f9 into Cephla-Lab:master Aug 24, 2026
2 checks passed
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