Skip to content

frontend: Side dock columns get their width back when the window widens (#2225) - #2434

Merged
zackees merged 2 commits into
masterfrom
fix/2225-side-dock-width
Oct 26, 2026
Merged

zackees merged 2 commits into
masterfrom
fix/2225-side-dock-width

Conversation

@zackees

@zackees zackees commented Oct 26, 2026

Copy link
Copy Markdown
Member

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:

1600 800 1600 again
Audio Mixer / Transitions / Controls 783 / 245 / 276 257 / 135 / 203 839 / 261 / 295 (same shares, from #2258)
Scenes/Sources column 280 188 188

#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

DockProportions now 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.

  • The area changes size while the window doesn't (a dragged edge): its share of the window is recorded.
  • The window changes size: the share comes back through resizeDocks once it fits above the docks' minimum. Otherwise it waits for the window to grow.
  • The window's own resize now queues the check too, since a widening window can leave every dock untouched.
  • An area with docks side by side across its depth is left to Qt.

Tests

  • RED 3f0be85 adds two cases to test_dock_proportions (Qt offscreen, column + bottom row, corners like OBSBasic):
    • 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.
  • GREEN 3bf0d8c: all 7 cases pass (after: column 280 px), including a new stepped case (side_column_comes_back_after_steps). The four existing row cases are unchanged.
  • I built and ran it locally against Qt 6.4 (ubuntu:24.04) with g++.

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.

…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
zackees enabled auto-merge October 26, 2026 00:57
@zackees

zackees commented Oct 26, 2026

Copy link
Copy Markdown
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.

@zackees
zackees added this pull request to the merge queue Oct 26, 2026
Merged via the queue into master with commit 022497b Oct 26, 2026
38 checks passed
@zackees
zackees deleted the fix/2225-side-dock-width branch October 26, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant