Skip to content

Enable dock-floating with title bars#37

Closed
ChemistAion wants to merge 2 commits intohoumain:mainfrom
ChemistAion:rc1#docking
Closed

Enable dock-floating with title bars#37
ChemistAion wants to merge 2 commits intohoumain:mainfrom
ChemistAion:rc1#docking

Conversation

@ChemistAion
Copy link
Copy Markdown

Enable DockWidgetFloatable on 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.

Copilot AI review requested due to automatic review settings February 22, 2026 21:44
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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::DockWidgetFloatable for Session / File Browser / Messages / Output docks in MainWindow.
  • 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.

Comment on lines 132 to +136
dock = new QDockWidget(tr("Session"), this);
dock->setObjectName("Session");
dock->setTitleBarWidget(new WindowTitle(dock));
dock->setFeatures(QDockWidget::DockWidgetClosable
| QDockWidget::DockWidgetMovable);
| QDockWidget::DockWidgetMovable | QDockWidget::DockWidgetFloatable);
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
@ChemistAion
Copy link
Copy Markdown
Author

...seems implemented lately

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants