diff --git a/src/AutoHideDockContainer.cpp b/src/AutoHideDockContainer.cpp index a034d70..41f5c2e 100644 --- a/src/AutoHideDockContainer.cpp +++ b/src/AutoHideDockContainer.cpp @@ -226,7 +226,6 @@ CAutoHideDockContainer::CAutoHideDockContainer(CDockWidget* DockWidget, CDockWid CAutoHideDockContainer(DockWidget->dockManager(), area, parent) { addDockWidget(DockWidget); - setDockSizeProportion(DockWidget->DefaultAutoHideDockProportion()); } @@ -325,35 +324,6 @@ void CAutoHideDockContainer::addDockWidget(CDockWidget* DockWidget) } -//============================================================================ -void CAutoHideDockContainer::setDockSizeProportion(float SplitterProportion) -{ - if (SplitterProportion < 0 || SplitterProportion > 1) - { - ADS_PRINT("SplitterProportion must be set between 0 and 1."); - return; - } - - const auto dockSize = static_cast(static_cast(INT_MAX) * SplitterProportion); - const auto remainingSize = INT_MAX - dockSize; - /* switch (d->SideTabBarArea) - { - case CDockWidgetSideTab::Left: - { - setSizes({ dockSize, remainingSize }); - break; - } - case CDockWidgetSideTab::Right: - case CDockWidgetSideTab::Bottom: - { - setSizes({ remainingSize, dockSize }); - break; - } - }*/ - -} - - //============================================================================ CDockWidgetSideTab::SideTabBarArea CAutoHideDockContainer::sideTabBarArea() const { diff --git a/src/AutoHideDockContainer.h b/src/AutoHideDockContainer.h index 821f490..6ecf7db 100644 --- a/src/AutoHideDockContainer.h +++ b/src/AutoHideDockContainer.h @@ -97,14 +97,6 @@ public: */ void addDockWidget(CDockWidget* DockWidget); - /* - * Set default splitter sizes. Don't use when restoring state - * As we want the size from the XML - * Takes a float between 0 and 1 - * E.g. 0.25 is a quarter of the size, 0.5 is half the size and 1 is the entire size of the container - */ - void setDockSizeProportion(float SplitterProportion = 0.25); - /** * Returns the side tab bar area of this Auto Hide dock container */ diff --git a/src/DockAreaTitleBar.cpp b/src/DockAreaTitleBar.cpp index cb2860f..bc047da 100644 --- a/src/DockAreaTitleBar.cpp +++ b/src/DockAreaTitleBar.cpp @@ -412,6 +412,11 @@ void CDockAreaTitleBar::onUndockButtonClicked() { if (d->DockArea->features().testFlag(CDockWidget::DockWidgetFloatable)) { + if (d->DockArea->autoHideDockContainer()) + { + d->DockArea->autoHideDockContainer()->cleanupAndDelete(); + } + d->makeAreaFloating(mapFromGlobal(QCursor::pos()), DraggingInactive); } }