mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-11-15 13:15:43 +08:00
Removed config flag CDockManager::AutoHideDockAreaHasTitle - this should not be configurable
This commit is contained in:
parent
1189945ef1
commit
af4a3ef2a8
@ -654,7 +654,7 @@ CMainWindow::CMainWindow(QWidget *parent) :
|
|||||||
CDockManager::setConfigFlag(CDockManager::FocusHighlighting, true);
|
CDockManager::setConfigFlag(CDockManager::FocusHighlighting, true);
|
||||||
|
|
||||||
// uncomment if you would like to enable dock widget auto hiding
|
// uncomment if you would like to enable dock widget auto hiding
|
||||||
CDockManager::setConfigFlag(CDockManager::DefaultAutoHideConfig, true);
|
CDockManager::setConfigFlags(CDockManager::DefaultAutoHideConfig);
|
||||||
|
|
||||||
// uncomment if you would like to enable an equal distribution of the
|
// uncomment if you would like to enable an equal distribution of the
|
||||||
// available size of a splitter to all contained dock widgets
|
// available size of a splitter to all contained dock widgets
|
||||||
|
@ -820,7 +820,7 @@ void CDockAreaWidget::updateTitleBarVisibility()
|
|||||||
d->TitleBar->setVisible(isAutoHide() ? true : !Hidden); // Titlebar must always be visible when auto hidden so it can be dragged
|
d->TitleBar->setVisible(isAutoHide() ? true : !Hidden); // Titlebar must always be visible when auto hidden so it can be dragged
|
||||||
auto tabBar = d->TitleBar->tabBar();
|
auto tabBar = d->TitleBar->tabBar();
|
||||||
tabBar->setVisible(isAutoHide() ? false : !Hidden); // Never show tab bar when auto hidden
|
tabBar->setVisible(isAutoHide() ? false : !Hidden); // Never show tab bar when auto hidden
|
||||||
d->TitleBar->autoHideTitleLabel()->setVisible(CDockManager::testConfigFlag(CDockManager::AutoHideDockAreaHasTitle) && isAutoHide()); // Always show when auto hidden, never otherwise
|
d->TitleBar->autoHideTitleLabel()->setVisible(isAutoHide()); // Always show when auto hidden, never otherwise
|
||||||
updateTitleBarButtonVisibility(Container->topLevelDockArea() == this);
|
updateTitleBarButtonVisibility(Container->topLevelDockArea() == this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -230,17 +230,15 @@ public:
|
|||||||
{
|
{
|
||||||
AutoHideFeatureEnabled = 0x01,
|
AutoHideFeatureEnabled = 0x01,
|
||||||
DockAreaHasAutoHideButton = 0x02, //!< If the flag is set each dock area has a auto hide menu button
|
DockAreaHasAutoHideButton = 0x02, //!< If the flag is set each dock area has a auto hide menu button
|
||||||
LeftSideBarPrioritizeIconOnly = 0x04, //!< If the flag is set left side bar will prioritize showing icons only over text
|
LeftSideBarIconOnly = 0x04, //!< If the flag is set left side bar will show only icon if a the dock widget has an icon assigned
|
||||||
RightSideBarPrioritizeIconOnly = 0x08, //!< If the flag is set right side bar will prioritize showing icons only over text
|
RightSideBarIconOnly = 0x08, //!< If the flag is set right side bar will show only icon if a the dock widget has an icon assigned
|
||||||
BottomSideBarPrioritizeIconOnly = 0x10,//!< If the flag is set bottom side bar will prioritize showing icons only over text
|
BottomSideBarIconOnly = 0x10,//!< If the flag is set bottom side show only icon if a the dock widget has an icon assigned
|
||||||
TopSideBarPrioritizeIconOnly = 0x20, //!< If the flag is set top side bar will prioritize showing icons only over text
|
TopSideBarIconOnly = 0x20, //!< If the flag is set top side bar show only icon if a the dock widget has an icon assigned
|
||||||
AutoHideDockAreaHasTitle = 0x40, //!< If the flag is set overlay dock area title bar will show the window title
|
AutoHideButtonTogglesArea = 0x40, //!< If the flag is set, the auto hide button enables auto hiding for all dock widgets in an area, if disabled, only the current dock widget will be toggled
|
||||||
AutoHideButtonTogglesArea = 0x80, //!< If the flag is set, the auto hide button enables auto hiding for all dock widgets in an area, if disabled, only the current dock widget will be toggled
|
|
||||||
AutoHideButtonCheckable = 0x80, //!< If the flag is set, the auto hide button will be checked and unchecked depending on the auto hide state. Mainly for styling purposes.
|
AutoHideButtonCheckable = 0x80, //!< If the flag is set, the auto hide button will be checked and unchecked depending on the auto hide state. Mainly for styling purposes.
|
||||||
|
|
||||||
DefaultAutoHideConfig = AutoHideFeatureEnabled
|
DefaultAutoHideConfig = AutoHideFeatureEnabled
|
||||||
| DockAreaHasAutoHideButton
|
| DockAreaHasAutoHideButton ///< the default configuration for left and right side bars
|
||||||
| AutoHideDockAreaHasTitle, ///< the default configuration for left and right side bars
|
|
||||||
};
|
};
|
||||||
Q_DECLARE_FLAGS(AutoHideFlags, eAutoHideFlag)
|
Q_DECLARE_FLAGS(AutoHideFlags, eAutoHideFlag)
|
||||||
|
|
||||||
|
@ -151,29 +151,30 @@ void CDockWidgetSideTab::updateOrientationForArea(SideBarLocation area)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CDockManager::testConfigFlag(CDockManager::LeftSideBarPrioritizeIconOnly) && area == Left)
|
bool IconOnly = false;
|
||||||
|
switch (area)
|
||||||
{
|
{
|
||||||
setText("");
|
case SideBarLocation::Left:
|
||||||
setOrientation(Qt::Horizontal);
|
IconOnly = CDockManager::testConfigFlag(CDockManager::LeftSideBarIconOnly);
|
||||||
return;
|
break;
|
||||||
|
|
||||||
|
case SideBarLocation::Right:
|
||||||
|
IconOnly = CDockManager::testConfigFlag(CDockManager::RightSideBarIconOnly);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SideBarLocation::Top:
|
||||||
|
IconOnly = CDockManager::testConfigFlag(CDockManager::BottomSideBarIconOnly);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SideBarLocation::Bottom:
|
||||||
|
IconOnly = CDockManager::testConfigFlag(CDockManager::TopSideBarIconOnly);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if (CDockManager::testConfigFlag(CDockManager::RightSideBarPrioritizeIconOnly) && area == Right)
|
|
||||||
|
if (IconOnly)
|
||||||
{
|
{
|
||||||
setText("");
|
setText("");
|
||||||
setOrientation(Qt::Horizontal);
|
setOrientation(Qt::Horizontal);
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (CDockManager::testConfigFlag(CDockManager::BottomSideBarPrioritizeIconOnly) && area == Bottom)
|
|
||||||
{
|
|
||||||
setText("");
|
|
||||||
setOrientation(Qt::Horizontal);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (CDockManager::testConfigFlag(CDockManager::TopSideBarPrioritizeIconOnly) && area == Top)
|
|
||||||
{
|
|
||||||
setText("");
|
|
||||||
setOrientation(Qt::Horizontal);
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,6 +35,39 @@ ads--CDockAreaWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ads--CDockAreaTitleBar {
|
||||||
|
background: transparent;
|
||||||
|
border-bottom: 2px solid palette(light);
|
||||||
|
padding-bottom: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
ads--CDockAreaWidget[focused="true"] ads--CDockAreaTitleBar {
|
||||||
|
border-bottom: 2px solid palette(highlight);
|
||||||
|
}
|
||||||
|
|
||||||
|
ads--CTitleBarButton {
|
||||||
|
padding: 0px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#tabsMenuButton::menu-indicator {
|
||||||
|
image: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#dockAreaCloseButton {
|
||||||
|
qproperty-icon: url(:/ads/images/close-button.svg),
|
||||||
|
url(:/ads/images/close-button-disabled.svg) disabled;
|
||||||
|
qproperty-iconSize: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#detachGroupButton {
|
||||||
|
qproperty-icon: url(:/ads/images/detach-button.svg),
|
||||||
|
url(:/ads/images/detach-button-disabled.svg) disabled;
|
||||||
|
qproperty-iconSize: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* CDockWidgetTab
|
* CDockWidgetTab
|
||||||
@ -63,28 +96,6 @@ ads--CDockWidgetTab[activeTab="true"] QLabel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************
|
|
||||||
* CDockWidget
|
|
||||||
*****************************************************************************/
|
|
||||||
ads--CDockWidget {
|
|
||||||
background: palette(light);
|
|
||||||
border-color: palette(light);
|
|
||||||
border-style: solid;
|
|
||||||
border-width: 1px 0 0 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
QScrollArea#dockWidgetScrollArea {
|
|
||||||
padding: 0px;
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************
|
|
||||||
* Dock widget tab styling
|
|
||||||
*****************************************************************************/
|
|
||||||
#tabCloseButton {
|
#tabCloseButton {
|
||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
background: none;
|
background: none;
|
||||||
@ -129,38 +140,19 @@ ads--CDockWidgetTab[focused="true"] QLabel {
|
|||||||
|
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Dock area title bar and buttons styling
|
* CDockWidget
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
ads--CDockAreaTitleBar {
|
ads--CDockWidget {
|
||||||
background: transparent;
|
background: palette(light);
|
||||||
border-bottom: 2px solid palette(light);
|
border-color: palette(light);
|
||||||
padding-bottom: 0px;
|
border-style: solid;
|
||||||
}
|
border-width: 1px 0 0 0;
|
||||||
|
|
||||||
ads--CDockAreaWidget[focused="true"] ads--CDockAreaTitleBar {
|
|
||||||
border-bottom: 2px solid palette(highlight);
|
|
||||||
}
|
|
||||||
|
|
||||||
ads--CTitleBarButton {
|
|
||||||
padding: 0px 0px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#tabsMenuButton::menu-indicator {
|
QScrollArea#dockWidgetScrollArea {
|
||||||
image: none;
|
padding: 0px;
|
||||||
}
|
border: none;
|
||||||
|
|
||||||
|
|
||||||
#dockAreaCloseButton {
|
|
||||||
qproperty-icon: url(:/ads/images/close-button.svg),
|
|
||||||
url(:/ads/images/close-button-disabled.svg) disabled;
|
|
||||||
qproperty-iconSize: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#detachGroupButton {
|
|
||||||
qproperty-icon: url(:/ads/images/detach-button.svg),
|
|
||||||
url(:/ads/images/detach-button-disabled.svg) disabled;
|
|
||||||
qproperty-iconSize: 16px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user