diff --git a/src/DockManager.h b/src/DockManager.h index 973c078..e018725 100644 --- a/src/DockManager.h +++ b/src/DockManager.h @@ -214,6 +214,7 @@ public: //! Users can overwrite this by setting the environment variable ADS_UseNativeTitle to "1" or "0". MiddleMouseButtonClosesTab = 0x2000000, //! If the flag is set, the user can use the mouse middle button to close the tab under the mouse DisableTabTextEliding = 0x4000000, //! Set this flag to disable eliding of tab texts in dock area tabs + ShowTabTextOnlyForActiveTab =0x8000000, //! Set this flag to show label texts in dock area tabs only for active tabs DefaultDockAreaButtons = DockAreaHasCloseButton | DockAreaHasUndockButton diff --git a/src/DockWidgetTab.cpp b/src/DockWidgetTab.cpp index 420cb81..0a8bdae 100644 --- a/src/DockWidgetTab.cpp +++ b/src/DockWidgetTab.cpp @@ -581,6 +581,14 @@ void CDockWidgetTab::setActiveTab(bool active) { d->updateCloseButtonVisibility(active); + if(CDockManager::testConfigFlag(CDockManager::ShowTabTextOnlyForActiveTab) && !d->Icon.isNull()) + { + if(active) + d->TitleLabel->setVisible(true); + else + d->TitleLabel->setVisible(false); + } + // Focus related stuff if (CDockManager::testConfigFlag(CDockManager::FocusHighlighting) && !d->DockWidget->dockManager()->isRestoringState()) {