Implemented support for Opaque / Non Opaque auto hide container resizing

This commit is contained in:
Uwe Kindler 2022-10-26 15:06:23 +02:00
parent f22d62a85b
commit f5ac29c19e
2 changed files with 10 additions and 1 deletions

View File

@ -616,7 +616,7 @@ CMainWindow::CMainWindow(QWidget *parent) :
// uncomment the following line if you want to use opaque undocking and // uncomment the following line if you want to use opaque undocking and
// opaque splitter resizing // opaque splitter resizing
// CDockManager::setConfigFlags(CDockManager::DefaultOpaqueConfig); //CDockManager::setConfigFlags(CDockManager::DefaultOpaqueConfig);
// uncomment the following line if you want a fixed tab width that does // uncomment the following line if you want a fixed tab width that does
// not change if the visibility of the close button changes // not change if the visibility of the close button changes

View File

@ -94,6 +94,10 @@ int resizeHandleLayoutPosition(CDockWidgetSideTab::SideTabBarArea Area)
return 0; return 0;
} }
/**
* Private data of CAutoHideDockContainer - pimpl
*/
struct AutoHideDockContainerPrivate struct AutoHideDockContainerPrivate
{ {
CAutoHideDockContainer* _this; CAutoHideDockContainer* _this;
@ -126,6 +130,9 @@ struct AutoHideDockContainerPrivate
return LeftDockWidgetArea; return LeftDockWidgetArea;
} }
/**
* Update the resize limit of the resize handle
*/
void updateResizeHandleSizeLimitMax() void updateResizeHandleSizeLimitMax()
{ {
auto Rect = _this->parentContainer()->contentRect(); auto Rect = _this->parentContainer()->contentRect();
@ -182,6 +189,8 @@ CAutoHideDockContainer::CAutoHideDockContainer(CDockManager* DockManager, CDockW
d->Layout->addWidget(d->DockArea); d->Layout->addWidget(d->DockArea);
d->ResizeHandle = new CResizeHandle(edgeFromSideTabBarArea(area), this); d->ResizeHandle = new CResizeHandle(edgeFromSideTabBarArea(area), this);
d->ResizeHandle->setMinResizeSize(64); d->ResizeHandle->setMinResizeSize(64);
bool OpaqueResize = CDockManager::testConfigFlag(CDockManager::OpaqueSplitterResize);
d->ResizeHandle->setOpaqueResize(OpaqueResize);
d->Layout->insertWidget(resizeHandleLayoutPosition(area), d->ResizeHandle); d->Layout->insertWidget(resizeHandleLayoutPosition(area), d->ResizeHandle);
d->Size = d->DockArea->size(); d->Size = d->DockArea->size();