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);
|
||||
|
||||
// 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
|
||||
// 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
|
||||
auto tabBar = d->TitleBar->tabBar();
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
@ -230,17 +230,15 @@ public:
|
||||
{
|
||||
AutoHideFeatureEnabled = 0x01,
|
||||
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
|
||||
RightSideBarPrioritizeIconOnly = 0x08, //!< If the flag is set right side bar will prioritize showing icons only over text
|
||||
BottomSideBarPrioritizeIconOnly = 0x10,//!< If the flag is set bottom side bar will prioritize showing icons only over text
|
||||
TopSideBarPrioritizeIconOnly = 0x20, //!< If the flag is set top side bar will prioritize showing icons only over text
|
||||
AutoHideDockAreaHasTitle = 0x40, //!< If the flag is set overlay dock area title bar will show the window title
|
||||
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
|
||||
LeftSideBarIconOnly = 0x04, //!< If the flag is set left side bar will show only icon if a the dock widget has an icon assigned
|
||||
RightSideBarIconOnly = 0x08, //!< If the flag is set right side bar will show only icon if a the dock widget has an icon assigned
|
||||
BottomSideBarIconOnly = 0x10,//!< If the flag is set bottom side show only icon if a the dock widget has an icon assigned
|
||||
TopSideBarIconOnly = 0x20, //!< If the flag is set top side bar show only icon if a the dock widget has an icon assigned
|
||||
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
|
||||
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
|
||||
| DockAreaHasAutoHideButton
|
||||
| AutoHideDockAreaHasTitle, ///< the default configuration for left and right side bars
|
||||
| DockAreaHasAutoHideButton ///< the default configuration for left and right side bars
|
||||
};
|
||||
Q_DECLARE_FLAGS(AutoHideFlags, eAutoHideFlag)
|
||||
|
||||
|
@ -151,29 +151,30 @@ void CDockWidgetSideTab::updateOrientationForArea(SideBarLocation area)
|
||||
return;
|
||||
}
|
||||
|
||||
if (CDockManager::testConfigFlag(CDockManager::LeftSideBarPrioritizeIconOnly) && area == Left)
|
||||
bool IconOnly = false;
|
||||
switch (area)
|
||||
{
|
||||
setText("");
|
||||
setOrientation(Qt::Horizontal);
|
||||
return;
|
||||
case SideBarLocation::Left:
|
||||
IconOnly = CDockManager::testConfigFlag(CDockManager::LeftSideBarIconOnly);
|
||||
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("");
|
||||
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
|
||||
@ -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 {
|
||||
margin-top: 2px;
|
||||
background: none;
|
||||
@ -129,38 +140,19 @@ ads--CDockWidgetTab[focused="true"] QLabel {
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* Dock area title bar and buttons styling
|
||||
* CDockWidget
|
||||
*****************************************************************************/
|
||||
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;
|
||||
ads--CDockWidget {
|
||||
background: palette(light);
|
||||
border-color: palette(light);
|
||||
border-style: solid;
|
||||
border-width: 1px 0 0 0;
|
||||
}
|
||||
|
||||
|
||||
#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;
|
||||
QScrollArea#dockWidgetScrollArea {
|
||||
padding: 0px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user