obs-studio icon indicating copy to clipboard operation
obs-studio copied to clipboard

frontend: Move Preview into dock widget

Open Warchamp7 opened this issue 7 months ago • 2 comments

Description

Moves the widgets for the preview into an OBSDock within the main window. Instead of the preview being the centralwidget, a new dummy one is added to the top of the window, and all docks have their allowedAreas set to BottomDockWidgetArea only.

Depends on #12188

[!NOTE]
Still need to update Browser Docks to have their allowedAreas set correctly, as well as probably override the addDock method to force set it.

The Preview dock cannot be moved, undocked or hidden and has an empty widget for it's title bar. Functionally it is effectively identical to before.

image

Motivation and Context

This makes certain dock layouts much more intuitive to set up, moves us a small step closer to more encapsulation of main window functionality. This is also a requirement for additional UI changes in the future that I am experimenting with involving either a top toolbar or a dedicated sidebar as a revamped home for Outputs, contextual controls, and eventually canvases.

How Has This Been Tested?

Interacted with the preview and ensured functionality matched main.

Types of changes

  • Tweak (non-breaking change to improve existing functionality)

Checklist:

  • [x] My code has been run through clang-format.
  • [x] I have read the contributing document.
  • [x] My code is not on the master branch.
  • [x] The code has been tested.
  • [x] All commit messages are properly formatted and commits squashed where appropriate.
  • [x] I have included updates to all appropriate documentation.

Warchamp7 avatar May 23 '25 07:05 Warchamp7

By putting everything in a single dock area "Full-Height docks" option will not be functional anymore.

OBSBasic::AddDockWidget might need to force to bottom area too for docks from plugins

exeldro avatar May 23 '25 08:05 exeldro

By putting everything in a single dock area "Full-Height docks" option will not be functional anymore.

Correct, the option won't be needed anymore, since the preview not being the central widget will no longer restrict docks from being laid out in the way that full height docks addressed.

OBSBasic::AddDockWidget might need to force to bottom area too for docks from plugins

Yep, this is also planned.

Warchamp7 avatar May 27 '25 21:05 Warchamp7