Enable dock-floating with title bars#37
Conversation
There was a problem hiding this comment.
Pull request overview
Enables floating for the main side docks and preserves custom dock title/caption bars while floating, so users can re-initiate drag-to-redock after a dock has been moved outside the docking area.
Changes:
- Enable
QDockWidget::DockWidgetFloatablefor Session / File Browser / Messages / Output docks inMainWindow. - Stop removing the custom dock title bar when a dock becomes floating in
DockWindow.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/windows/MainWindow.cpp | Adds DockWidgetFloatable to the main auxiliary docks so they can be floated and re-docked. |
| src/editors/DockWindow.cpp | Keeps the custom DockTitle installed even when docks become floating, preserving a draggable caption area. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| dock = new QDockWidget(tr("Session"), this); | ||
| dock->setObjectName("Session"); | ||
| dock->setTitleBarWidget(new WindowTitle(dock)); | ||
| dock->setFeatures(QDockWidget::DockWidgetClosable | ||
| | QDockWidget::DockWidgetMovable); | ||
| | QDockWidget::DockWidgetMovable | QDockWidget::DockWidgetFloatable); |
There was a problem hiding this comment.
PR description says "Enable DockWidgetFloatable on all docks", but MainWindow still creates an "Editors" QDockWidget with NoDockWidgetFeatures (non-floatable). If that dock is intentionally not floatable, consider clarifying the PR description; otherwise, update its features accordingly so the statement is accurate.
|
...seems implemented lately |
Enable
DockWidgetFloatableon all docks.Keep dock title/caption bars when floating so drag-to-redock works.
Without this patch, when dragging any tile/window outside the docking canvas and leaving it there, the title/caption bar is lost and there is no way to restart dragging.
The window remains as a raw floating frame.