Merge branch 'master' of https://github.com/nitramr/Qt-Advanced-Docking-System into nitramr-master

This commit is contained in:
Uwe Kindler 2023-12-04 09:10:34 +01:00
commit 0fabebb0fe
2 changed files with 9 additions and 0 deletions

View File

@ -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

View File

@ -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())
{