mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2025-04-01 02:42:39 +08:00
Merge branch 'githubuser0xFFFF:master' into master
This commit is contained in:
commit
3ab6d7fc0f
2
.github/workflows/linux-builds.yml
vendored
2
.github/workflows/linux-builds.yml
vendored
@ -6,7 +6,7 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, ubuntu-20.04, ubuntu-18.04]
|
os: [ubuntu-20.04, ubuntu-18.04]
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
|
@ -187,14 +187,7 @@ AutoHideDockContainerPrivate::AutoHideDockContainerPrivate(
|
|||||||
//============================================================================
|
//============================================================================
|
||||||
CDockContainerWidget* CAutoHideDockContainer::dockContainer() const
|
CDockContainerWidget* CAutoHideDockContainer::dockContainer() const
|
||||||
{
|
{
|
||||||
if (d->DockArea)
|
return internal::findParent<CDockContainerWidget*>(this);
|
||||||
{
|
|
||||||
return d->DockArea->dockContainer();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return internal::findParent<CDockContainerWidget*>(this);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -303,8 +296,15 @@ CAutoHideDockContainer::~CAutoHideDockContainer()
|
|||||||
//============================================================================
|
//============================================================================
|
||||||
CAutoHideSideBar* CAutoHideDockContainer::sideBar() const
|
CAutoHideSideBar* CAutoHideDockContainer::sideBar() const
|
||||||
{
|
{
|
||||||
auto DockContainer = dockContainer();
|
if (d->SideTab)
|
||||||
return DockContainer ? DockContainer->sideTabBar(d->SideTabBarArea) : nullptr;
|
{
|
||||||
|
return d->SideTab->sideBar();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
auto DockContainer = dockContainer();
|
||||||
|
return DockContainer ? DockContainer->sideTabBar(d->SideTabBarArea) : nullptr;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -378,11 +378,19 @@ int CAutoHideSideBar::spacing() const
|
|||||||
return d->TabsLayout->spacing();
|
return d->TabsLayout->spacing();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
void CAutoHideSideBar::setSpacing(int Spacing)
|
void CAutoHideSideBar::setSpacing(int Spacing)
|
||||||
{
|
{
|
||||||
d->TabsLayout->setSpacing(Spacing);
|
d->TabsLayout->setSpacing(Spacing);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//===========================================================================
|
||||||
|
CDockContainerWidget* CAutoHideSideBar::dockContainer() const
|
||||||
|
{
|
||||||
|
return d->ContainerWidget;
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace ads
|
} // namespace ads
|
||||||
|
|
||||||
|
@ -163,6 +163,11 @@ public:
|
|||||||
* Setter for spacing property - sets the spacing
|
* Setter for spacing property - sets the spacing
|
||||||
*/
|
*/
|
||||||
void setSpacing(int Spacing);
|
void setSpacing(int Spacing);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the dock container that hosts this sideBar()
|
||||||
|
*/
|
||||||
|
CDockContainerWidget* dockContainer() const;
|
||||||
};
|
};
|
||||||
} // namespace ads
|
} // namespace ads
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
@ -248,17 +248,31 @@ void DockWidgetPrivate::updateParentDockArea()
|
|||||||
//============================================================================
|
//============================================================================
|
||||||
void DockWidgetPrivate::closeAutoHideDockWidgetsIfNeeded()
|
void DockWidgetPrivate::closeAutoHideDockWidgetsIfNeeded()
|
||||||
{
|
{
|
||||||
if (_this->dockContainer() && _this->dockContainer()->openedDockWidgets().isEmpty() && !_this->dockManager()->isRestoringState())
|
auto DockContainer = _this->dockContainer();
|
||||||
|
if (!DockContainer)
|
||||||
{
|
{
|
||||||
for (auto autoHideWidget : _this->dockContainer()->autoHideWidgets())
|
return;
|
||||||
{
|
}
|
||||||
if (autoHideWidget->dockWidget() == _this)
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
autoHideWidget->dockWidget()->toggleView(false);
|
if (_this->dockManager()->isRestoringState())
|
||||||
}
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!DockContainer->openedDockWidgets().isEmpty())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (auto autoHideWidget : DockContainer->autoHideWidgets())
|
||||||
|
{
|
||||||
|
auto DockWidget = autoHideWidget->dockWidget();
|
||||||
|
if (DockWidget == _this)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
DockWidget->toggleView(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user