mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2025-01-25 05:49:02 +08:00
Added new auto hide config flag CDockManager::AutoHideButtonTogglesArea
This commit is contained in:
parent
90b92900a1
commit
60e0201060
@ -1100,12 +1100,28 @@ void CDockAreaWidget::closeArea()
|
|||||||
void CDockAreaWidget::toggleAutoHideArea(bool Enable)
|
void CDockAreaWidget::toggleAutoHideArea(bool Enable)
|
||||||
{
|
{
|
||||||
const auto area = dockContainer()->calculateSideTabBarArea(this);
|
const auto area = dockContainer()->calculateSideTabBarArea(this);
|
||||||
const auto DockWidget = currentDockWidget();
|
|
||||||
if (Enable == isAutoHide())
|
if (dockManager()->testConfigFlag(CDockManager::AutoHideButtonTogglesArea))
|
||||||
{
|
{
|
||||||
return;
|
for (const auto DockWidget : openedDockWidgets())
|
||||||
|
{
|
||||||
|
if (Enable == isAutoHide())
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
onAutoHideToggleRequested(DockWidget, !isAutoHide(), area);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
const auto DockWidget = currentDockWidget();
|
||||||
|
if (Enable == isAutoHide())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
onAutoHideToggleRequested(DockWidget, !isAutoHide(), area);
|
||||||
}
|
}
|
||||||
onAutoHideToggleRequested(DockWidget, !isAutoHide(), area);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
@ -226,16 +226,17 @@ public:
|
|||||||
|
|
||||||
enum eAutoHideFlag
|
enum eAutoHideFlag
|
||||||
{
|
{
|
||||||
DockContainerHasLeftSideBar = 0x01, //!< If the flag is set left side bar will prioritize showing icons only over text
|
DockContainerHasLeftSideBar = 0x01, //!< If the flag is set the dock manager will have a left side bar
|
||||||
DockContainerHasRightSideBar = 0x02, //!< If the flag is set right side bar will prioritize showing icons only over text
|
DockContainerHasRightSideBar = 0x02, //!< If the flag is set the dock manager will have a right side bar
|
||||||
DockContainerHasBottomSideBar = 0x04, //!< If the flag is set right side bar will prioritize showing icons only over text
|
DockContainerHasBottomSideBar = 0x04, //!< If the flag is set the dock manager will have a bottom side bar
|
||||||
DockContainerHasTopSideBar = 0x08, //!< If the flag is set right side bar will prioritize showing icons only over text
|
DockContainerHasTopSideBar = 0x08, //!< If the flag is set the dock manager will have a top side bar
|
||||||
DockAreaHasAutoHideButton = 0x10, //!< If the flag is set each dock area has a auto hide menu button
|
DockAreaHasAutoHideButton = 0x10, //!< If the flag is set each dock area has a auto hide menu button
|
||||||
LeftSideBarPrioritizeIconOnly = 0x20, //!< If the flag is set each container will have a left side bar
|
LeftSideBarPrioritizeIconOnly = 0x20, //!< If the flag is set left side bar will prioritize showing icons only over text
|
||||||
RightSideBarPrioritizeIconOnly = 0x40, //!< If the flag is set each container will have a right side bar
|
RightSideBarPrioritizeIconOnly = 0x40, //!< If the flag is set right side bar will prioritize showing icons only over text
|
||||||
BottomSideBarPrioritizeIconOnly = 0x80, //!< If the flag is set bottom side bar will prioritize showing icons only over text
|
BottomSideBarPrioritizeIconOnly = 0x80,//!< If the flag is set bottom side bar will prioritize showing icons only over text
|
||||||
TopSideBarPrioritizeIconOnly = 0x100, //!< If the flag is set bottom side bar will prioritize showing icons only over text
|
TopSideBarPrioritizeIconOnly = 0x100, //!< If the flag is set top side bar will prioritize showing icons only over text
|
||||||
AutoHideDockAreaHasTitle = 0x200, //!< If the flag is set overlay dock area title bar will show the window title
|
AutoHideDockAreaHasTitle = 0x200, //!< If the flag is set overlay dock area title bar will show the window title
|
||||||
|
AutoHideButtonTogglesArea = 0x400, //!< If the flag is set, the auto hide button enables auto hiding for all dock widgets in an area, if disabled, only the current dock widget will be toggled
|
||||||
|
|
||||||
DefaultAutoHideConfig = DockContainerHasLeftSideBar
|
DefaultAutoHideConfig = DockContainerHasLeftSideBar
|
||||||
| DockContainerHasRightSideBar
|
| DockContainerHasRightSideBar
|
||||||
|
Loading…
Reference in New Issue
Block a user