Repository navigation
frontend: Side dock columns get their width back when the window widens (#2225) - #2434
Merged
Merged
Conversation
…dens (RED) OBS's Scenes/Sources column shrank when the main window narrowed, and widening it again gave all of the new width to the preview. Two cases fail against the current helper: the column stays at 232 px instead of 280, and a dragged 400 px column comes back at 232 px. Refs #2225
DockProportions also records each dock area's share of the window (the Scenes/Sources column's width, the bottom row's height) when the area is resized on its own, and puts it back when the window changes size and the share fits. Qt gave all of a widening window's new width to the preview, so the column stayed as narrow as the narrowest window had made it. Refs #2225
zackees
enabled auto-merge
October 26, 2026 00:57
Member
Author
|
Coordinator review: logic is sound. A dragged edge (same window extent, new size) records the share; a window resize puts it back via resizeDocks once it fits above the docks' minimum. s.size is updated before the resize, so the queued follow-up doesn't mistake it for a drag. Areas with side-by-side docks across their depth are left to Qt. RED (3f0be85) then GREEN, the Tier 2 cmocka cases are added and not edited, and the ledger line is present. Refs (not Closes) is right, since the ini restore part of #2225 isn't reproduced. Queuing; it merges when CI is green. |
This was referenced Oct 28, 2026
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.
Refs #2225
What the real app showed
I ran the master AppImage (bb253a0, which includes #2258) under Xvfb with openbox in
ubuntu:24.04, using a fresh profile and the default layout. I resized the main window from 1600 to 800 px and back to 1600:#2258 restores the bottom row's shares. The left column stays as narrow as the narrowest window made it, because Qt gives all of the new width to the preview.
Fix
DockProportionsnow also tracks each dock area's depth against the window: the width of a left or right column, and the height of a top or bottom area.resizeDocksonce it fits above the docks' minimum. Otherwise it waits for the window to grow.Tests
test_dock_proportions(Qt offscreen, column + bottom row, corners likeOBSBasic):side_column_comes_back_after_narrow_then_wide:side0 is 232 px wide, expected 280.dragged_column_width_is_kept:side0 is 232 px wide, expected 400.after: column 280 px), including a new stepped case (side_column_comes_back_after_steps). The four existing row cases are unchanged.Not done: I haven't run this change in the full app. PR CI doesn't build the AppImage, so this says Refs. The profile ini save/restore part of #2225 still has no repro.