mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-11-15 13:15:43 +08:00
Implemented #554 - Add a configuration that avoid tab label eliding
This commit is contained in:
parent
3c941a2312
commit
62d2dd213d
@ -27,6 +27,7 @@
|
|||||||
- [`FloatingContainerForceNativeTitleBar` (Linux only)](#floatingcontainerforcenativetitlebar-linux-only)
|
- [`FloatingContainerForceNativeTitleBar` (Linux only)](#floatingcontainerforcenativetitlebar-linux-only)
|
||||||
- [`FloatingContainerForceQWidgetTitleBar` (Linux only)](#floatingcontainerforceqwidgettitlebar-linux-only)
|
- [`FloatingContainerForceQWidgetTitleBar` (Linux only)](#floatingcontainerforceqwidgettitlebar-linux-only)
|
||||||
- [`MiddleMouseButtonClosesTab`](#middlemousebuttonclosestab)
|
- [`MiddleMouseButtonClosesTab`](#middlemousebuttonclosestab)
|
||||||
|
- [`DisableTabTextEliding`](#disabletabtexteliding)
|
||||||
- [Auto-Hide Configuration Flags](#auto-hide-configuration-flags)
|
- [Auto-Hide Configuration Flags](#auto-hide-configuration-flags)
|
||||||
- [Auto Hide Dock Widgets](#auto-hide-dock-widgets)
|
- [Auto Hide Dock Widgets](#auto-hide-dock-widgets)
|
||||||
- [Pinning Auto-Hide Widgets to a certain border](#pinning-auto-hide-widgets-to-a-certain-border)
|
- [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
|
close tab. Just click with the middle mouse button on a tab like this is
|
||||||
possible in various web browsers.
|
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)
|
![MiddleMouseButtonClosesTab true](cfg_flag_MiddleMouseButtonClosesTab.gif)
|
||||||
|
|
||||||
## Auto-Hide Configuration Flags
|
## Auto-Hide Configuration Flags
|
||||||
|
@ -213,6 +213,7 @@ public:
|
|||||||
//!< If neither this nor FloatingContainerForceNativeTitleBar is set (the default) native titlebars are used except on known bad systems.
|
//!< 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".
|
//! 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
|
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
|
DefaultDockAreaButtons = DockAreaHasCloseButton
|
||||||
| DockAreaHasUndockButton
|
| DockAreaHasUndockButton
|
||||||
|
@ -245,7 +245,14 @@ DockWidgetTabPrivate::DockWidgetTabPrivate(CDockWidgetTab* _public) :
|
|||||||
void DockWidgetTabPrivate::createLayout()
|
void DockWidgetTabPrivate::createLayout()
|
||||||
{
|
{
|
||||||
TitleLabel = new tTabLabel();
|
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->setText(DockWidget->windowTitle());
|
||||||
TitleLabel->setObjectName("dockWidgetTabLabel");
|
TitleLabel->setObjectName("dockWidgetTabLabel");
|
||||||
TitleLabel->setAlignment(Qt::AlignCenter);
|
TitleLabel->setAlignment(Qt::AlignCenter);
|
||||||
|
Loading…
Reference in New Issue
Block a user