diff --git a/src/DockAreaTitleBar.cpp b/src/DockAreaTitleBar.cpp index 9dd3641..a6e97ba 100644 --- a/src/DockAreaTitleBar.cpp +++ b/src/DockAreaTitleBar.cpp @@ -197,6 +197,8 @@ void DockAreaTitleBarPrivate::createButtons() internal::setToolTip(AutoHideButton, QObject::tr("Toggle Auto Hide")); internal::setButtonIcon(AutoHideButton, QStyle::SP_DialogOkButton, ads::AutoHideIcon); AutoHideButton->setSizePolicy(ButtonSizePolicy); + AutoHideButton->setCheckable(testConfigFlag(CDockManager::AutoHideButtonCheckable)); + AutoHideButton->setChecked(false); Layout->addWidget(AutoHideButton, 0); _this->connect(AutoHideButton, SIGNAL(clicked()), SLOT(onAutoHideButtonClicked())); diff --git a/src/DockManager.h b/src/DockManager.h index 83f1e45..3cc9e71 100644 --- a/src/DockManager.h +++ b/src/DockManager.h @@ -233,6 +233,7 @@ public: TopSideBarPrioritizeIconOnly = 0x10, //!< If the flag is set top side bar will prioritize showing icons only over text AutoHideDockAreaHasTitle = 0x20, //!< If the flag is set overlay dock area title bar will show the window title AutoHideButtonTogglesArea = 0x40, //!< 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 + AutoHideButtonCheckable = 0x80, //!< If the flag is set, the auto hide button will be checked and unchecked depending on the auto hide state. Mainly for styling purposes. DefaultAutoHideConfig = DockAreaHasAutoHideButton | AutoHideDockAreaHasTitle, ///< the default configuration for left and right side bars