mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-11-15 05:05:43 +08:00
new configuration of icon only tabs
This commit is contained in:
parent
5d6831d179
commit
818e568f4a
@ -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
|
||||
|
@ -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())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user