mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2025-01-24 05:22:06 +08:00
Removed superfluous function setDockSizeProportion()
This commit is contained in:
commit
44bfc56471
@ -226,7 +226,6 @@ CAutoHideDockContainer::CAutoHideDockContainer(CDockWidget* DockWidget, CDockWid
|
|||||||
CAutoHideDockContainer(DockWidget->dockManager(), area, parent)
|
CAutoHideDockContainer(DockWidget->dockManager(), area, parent)
|
||||||
{
|
{
|
||||||
addDockWidget(DockWidget);
|
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<int>(static_cast<float>(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
|
CDockWidgetSideTab::SideTabBarArea CAutoHideDockContainer::sideTabBarArea() const
|
||||||
{
|
{
|
||||||
|
@ -97,14 +97,6 @@ public:
|
|||||||
*/
|
*/
|
||||||
void addDockWidget(CDockWidget* DockWidget);
|
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
|
* Returns the side tab bar area of this Auto Hide dock container
|
||||||
*/
|
*/
|
||||||
|
@ -412,6 +412,11 @@ void CDockAreaTitleBar::onUndockButtonClicked()
|
|||||||
{
|
{
|
||||||
if (d->DockArea->features().testFlag(CDockWidget::DockWidgetFloatable))
|
if (d->DockArea->features().testFlag(CDockWidget::DockWidgetFloatable))
|
||||||
{
|
{
|
||||||
|
if (d->DockArea->autoHideDockContainer())
|
||||||
|
{
|
||||||
|
d->DockArea->autoHideDockContainer()->cleanupAndDelete();
|
||||||
|
}
|
||||||
|
|
||||||
d->makeAreaFloating(mapFromGlobal(QCursor::pos()), DraggingInactive);
|
d->makeAreaFloating(mapFromGlobal(QCursor::pos()), DraggingInactive);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user