diff --git a/doc/user-guide.md b/doc/user-guide.md index a0ceb9d9..3c0778bf 100644 --- a/doc/user-guide.md +++ b/doc/user-guide.md @@ -27,6 +27,7 @@ - [`FloatingContainerForceNativeTitleBar` (Linux only)](#floatingcontainerforcenativetitlebar-linux-only) - [`FloatingContainerForceQWidgetTitleBar` (Linux only)](#floatingcontainerforceqwidgettitlebar-linux-only) - [`MiddleMouseButtonClosesTab`](#middlemousebuttonclosestab) + - [`DisableTabTextEliding`](#disabletabtexteliding) - [Auto-Hide Configuration Flags](#auto-hide-configuration-flags) - [Auto Hide Dock Widgets](#auto-hide-dock-widgets) - [Pinning Auto-Hide Widgets to a certain border](#pinning-auto-hide-widgets-to-a-certain-border) @@ -465,6 +466,10 @@ under the mouse. So you do not need to exactly hit the tab close button to close tab. Just click with the middle mouse button on a tab like this is possible in various web browsers. +### `DisableTabTextEliding` + +Set this flag to disable eliding of tab texts in dock area tabs. + ![MiddleMouseButtonClosesTab true](cfg_flag_MiddleMouseButtonClosesTab.gif) ## Auto-Hide Configuration Flags diff --git a/src/DockManager.h b/src/DockManager.h index d24f632e..7f382d3c 100644 --- a/src/DockManager.h +++ b/src/DockManager.h @@ -213,6 +213,7 @@ public Q_SLOTS: //!< If neither this nor FloatingContainerForceNativeTitleBar is set (the default) native titlebars are used except on known bad systems. //! 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 DefaultDockAreaButtons = DockAreaHasCloseButton | DockAreaHasUndockButton diff --git a/src/DockWidgetTab.cpp b/src/DockWidgetTab.cpp index 669ddf3e..040939ab 100644 --- a/src/DockWidgetTab.cpp +++ b/src/DockWidgetTab.cpp @@ -245,7 +245,14 @@ DockWidgetTabPrivate::DockWidgetTabPrivate(CDockWidgetTab* _public) : void DockWidgetTabPrivate::createLayout() { TitleLabel = new tTabLabel(); - TitleLabel->setElideMode(Qt::ElideRight); + if (CDockManager::testConfigFlag(CDockManager::DisableTabTextEliding)) + { + TitleLabel->setElideMode(Qt::ElideNone); + } + else + { + TitleLabel->setElideMode(Qt::ElideRight); + } TitleLabel->setText(DockWidget->windowTitle()); TitleLabel->setObjectName("dockWidgetTabLabel"); TitleLabel->setAlignment(Qt::AlignCenter);