mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2025-04-16 10:24:45 +08:00
Merge branch 'close_button_collapse_dock' of https://github.com/duerr-ndt/Qt-Advanced-Docking-System into duerr-ndt-close_button_collapse_dock
This commit is contained in:
commit
0cac9ac507
@ -415,7 +415,12 @@ void CDockAreaTitleBar::onTabsMenuAboutToShow()
|
|||||||
void CDockAreaTitleBar::onCloseButtonClicked()
|
void CDockAreaTitleBar::onCloseButtonClicked()
|
||||||
{
|
{
|
||||||
ADS_PRINT("CDockAreaTitleBar::onCloseButtonClicked");
|
ADS_PRINT("CDockAreaTitleBar::onCloseButtonClicked");
|
||||||
if (d->testConfigFlag(CDockManager::DockAreaCloseButtonClosesTab))
|
if (CDockManager::testAutoHideConfigFlag(CDockManager::AutoHideCloseButtonCollapsesDock) &&
|
||||||
|
d->DockArea->autoHideDockContainer())
|
||||||
|
{
|
||||||
|
d->DockArea->autoHideDockContainer()->collapseView(true);
|
||||||
|
}
|
||||||
|
else if (d->testConfigFlag(CDockManager::DockAreaCloseButtonClosesTab))
|
||||||
{
|
{
|
||||||
d->TabBar->closeTab(d->TabBar->currentIndex());
|
d->TabBar->closeTab(d->TabBar->currentIndex());
|
||||||
}
|
}
|
||||||
|
@ -245,6 +245,7 @@ public:
|
|||||||
AutoHideButtonCheckable = 0x08, //!< If the flag is set, the auto hide button will be checked and unchecked depending on the auto hide state. Mainly for styling purposes.
|
AutoHideButtonCheckable = 0x08, //!< If the flag is set, the auto hide button will be checked and unchecked depending on the auto hide state. Mainly for styling purposes.
|
||||||
AutoHideSideBarsIconOnly = 0x10,///< show only icons in auto hide side tab - if a tab has no icon, then the text will be shown
|
AutoHideSideBarsIconOnly = 0x10,///< show only icons in auto hide side tab - if a tab has no icon, then the text will be shown
|
||||||
AutoHideShowOnMouseOver = 0x20, ///< show the auto hide window on mouse over tab and hide it if mouse leaves auto hide container
|
AutoHideShowOnMouseOver = 0x20, ///< show the auto hide window on mouse over tab and hide it if mouse leaves auto hide container
|
||||||
|
AutoHideCloseButtonCollapsesDock = 0x40, ///< Close button of an auto hide container closes the dock instead of hiding it completely
|
||||||
|
|
||||||
DefaultAutoHideConfig = AutoHideFeatureEnabled
|
DefaultAutoHideConfig = AutoHideFeatureEnabled
|
||||||
| DockAreaHasAutoHideButton ///< the default configuration for left and right side bars
|
| DockAreaHasAutoHideButton ///< the default configuration for left and right side bars
|
||||||
|
Loading…
Reference in New Issue
Block a user