diff --git a/demo/MainWindow.cpp b/demo/MainWindow.cpp index 52a72a8..4f2a757 100644 --- a/demo/MainWindow.cpp +++ b/demo/MainWindow.cpp @@ -564,7 +564,8 @@ CMainWindow::CMainWindow(QWidget *parent) : // CDockManager::setConfigFlag(CDockManager::HideSingleCentralWidgetTitleBar, true); // Now create the dock manager and its content - CDockManager::setConfigFlag(CDockManager::DockAreaHasCloseButton, true); + CDockManager::setConfigFlag(CDockManager::DragPreviewIsDynamic, true); + CDockManager::setConfigFlag(CDockManager::DragPreviewShowsContentPixmap, false); d->DockManager = new CDockManager(this); // uncomment the following line to have the old style where the dock diff --git a/doc/dynamic_drag_preview.gif b/doc/dynamic_drag_preview.gif new file mode 100644 index 0000000..669a4fd Binary files /dev/null and b/doc/dynamic_drag_preview.gif differ diff --git a/doc/user-guide.md b/doc/user-guide.md index 7c7e118..b46e782 100644 --- a/doc/user-guide.md +++ b/doc/user-guide.md @@ -12,6 +12,7 @@ - [`AllTabsHaveCloseButton`](#alltabshaveclosebutton) - [`RetainTabSizeWhenCloseButtonHidden`](#retaintabsizewhenclosebuttonhidden) - [`OpaqueUndocking`](#opaqueundocking) + - [`DragPreviewIsDynamic`](#dragpreviewisdynamic) ## Configuration Flags @@ -156,3 +157,17 @@ explicitely, you can do this by setting the predefined configuration flags ```c++ CDockManager::setConfigFlags(CDockManager::DefaultNonOpaqueConfig); ``` + +### `DragPreviewIsDynamic` + +If non-opaque undocking is enabled, this flag defines the behavior of the drag +preview window. If this flag is enabled, then it will give the user the +impression, that the floating drag preview is dynamically adjusted to the drop +area. In order to give the perfect impression, you should disable the flags +`DragPreviewShowsContentPixmap` and `DragPreviewHasWindowFrame`. + +```c++ +CDockManager::setConfigFlag(CDockManager::DragPreviewIsDynamic, true); +CDockManager::setConfigFlag(CDockManager::DragPreviewShowsContentPixmap, false); +CDockManager::setConfigFlag(CDockManager::DragPreviewHasWindowFrame, false); +``` \ No newline at end of file