Skip to content

Commit 62d2dd2

Browse files
Implemented #554 - Add a configuration that avoid tab label eliding
1 parent 3c941a2 commit 62d2dd2

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

doc/user-guide.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
- [`FloatingContainerForceNativeTitleBar` (Linux only)](#floatingcontainerforcenativetitlebar-linux-only)
2828
- [`FloatingContainerForceQWidgetTitleBar` (Linux only)](#floatingcontainerforceqwidgettitlebar-linux-only)
2929
- [`MiddleMouseButtonClosesTab`](#middlemousebuttonclosestab)
30+
- [`DisableTabTextEliding`](#disabletabtexteliding)
3031
- [Auto-Hide Configuration Flags](#auto-hide-configuration-flags)
3132
- [Auto Hide Dock Widgets](#auto-hide-dock-widgets)
3233
- [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
465466
close tab. Just click with the middle mouse button on a tab like this is
466467
possible in various web browsers.
467468
469+
### `DisableTabTextEliding`
470+
471+
Set this flag to disable eliding of tab texts in dock area tabs.
472+
468473
![MiddleMouseButtonClosesTab true](cfg_flag_MiddleMouseButtonClosesTab.gif)
469474
470475
## Auto-Hide Configuration Flags

src/DockManager.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ public Q_SLOTS:
213213
//!< If neither this nor FloatingContainerForceNativeTitleBar is set (the default) native titlebars are used except on known bad systems.
214214
//! Users can overwrite this by setting the environment variable ADS_UseNativeTitle to "1" or "0".
215215
MiddleMouseButtonClosesTab = 0x2000000, //! If the flag is set, the user can use the mouse middle button to close the tab under the mouse
216+
DisableTabTextEliding = 0x4000000, //! Set this flag to disable eliding of tab texts in dock area tabs
216217

217218
DefaultDockAreaButtons = DockAreaHasCloseButton
218219
| DockAreaHasUndockButton

src/DockWidgetTab.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,14 @@ DockWidgetTabPrivate::DockWidgetTabPrivate(CDockWidgetTab* _public) :
245245
void DockWidgetTabPrivate::createLayout()
246246
{
247247
TitleLabel = new tTabLabel();
248-
TitleLabel->setElideMode(Qt::ElideRight);
248+
if (CDockManager::testConfigFlag(CDockManager::DisableTabTextEliding))
249+
{
250+
TitleLabel->setElideMode(Qt::ElideNone);
251+
}
252+
else
253+
{
254+
TitleLabel->setElideMode(Qt::ElideRight);
255+
}
249256
TitleLabel->setText(DockWidget->windowTitle());
250257
TitleLabel->setObjectName("dockWidgetTabLabel");
251258
TitleLabel->setAlignment(Qt::AlignCenter);

0 commit comments

Comments
 (0)