fix(live): don't widen the panel for the Snap button; rename live button to Live/Stop - #620
Merged
Conversation
…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>
Contributor
There was a problem hiding this comment.
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The Snap button (#616) stretched the live-control panel through two of row 1's width demands:
Since the panel is pinned to its widest row (
setFixedWidth(minimumSizeHint)), every other row stretched with it on configs where these demands dominate.Changes
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.Verification
Booted the GUI from pre-#616 master (e86a608) and from this branch, same config, and compared:
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