Removed supefluous onAutoHideToggleRequested() function

This commit is contained in:
Uwe Kindler 2022-10-25 09:52:57 +02:00
commit ebdd950b4e
11 changed files with 137 additions and 169 deletions

View File

@ -30,6 +30,7 @@ set(ads_SRCS
SideTabBar.cpp SideTabBar.cpp
DockWidgetSideTab.cpp DockWidgetSideTab.cpp
AutoHideDockContainer.cpp AutoHideDockContainer.cpp
PushButton.cpp
ads.qrc ads.qrc
) )
set(ads_HEADERS set(ads_HEADERS
@ -54,6 +55,7 @@ set(ads_HEADERS
SideTabBar.h SideTabBar.h
DockWidgetSideTab.h DockWidgetSideTab.h
AutoHideDockContainer.h AutoHideDockContainer.h
PushButton.h
) )
add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/utf-8>") add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/utf-8>")
if (UNIX AND NOT APPLE) if (UNIX AND NOT APPLE)

View File

@ -198,6 +198,8 @@ void DockAreaTitleBarPrivate::createButtons()
internal::setToolTip(AutoHideButton, QObject::tr("Toggle Auto Hide")); internal::setToolTip(AutoHideButton, QObject::tr("Toggle Auto Hide"));
internal::setButtonIcon(AutoHideButton, QStyle::SP_DialogOkButton, ads::AutoHideIcon); internal::setButtonIcon(AutoHideButton, QStyle::SP_DialogOkButton, ads::AutoHideIcon);
AutoHideButton->setSizePolicy(ButtonSizePolicy); AutoHideButton->setSizePolicy(ButtonSizePolicy);
AutoHideButton->setCheckable(testConfigFlag(CDockManager::AutoHideButtonCheckable));
AutoHideButton->setChecked(false);
Layout->addWidget(AutoHideButton, 0); Layout->addWidget(AutoHideButton, 0);
_this->connect(AutoHideButton, SIGNAL(clicked()), SLOT(onAutoHideButtonClicked())); _this->connect(AutoHideButton, SIGNAL(clicked()), SLOT(onAutoHideButtonClicked()));

View File

@ -315,11 +315,6 @@ struct DockAreaWidgetPrivate
*/ */
void updateTitleBarButtonVisibility(bool isTopLevel); void updateTitleBarButtonVisibility(bool isTopLevel);
/**
* Convenience function to know if all dock widgets are focusable
*/
bool allDockWidgetsFocusable() const;
/** /**
* Scans all contained dock widgets for the max. minimum size hint * Scans all contained dock widgets for the max. minimum size hint
*/ */
@ -387,7 +382,7 @@ void DockAreaWidgetPrivate::updateTitleBarButtonVisibility(bool IsTopLevel)
if (IsTopLevel) if (IsTopLevel)
{ {
TitleBar->button(TitleBarButtonClose)->setVisible(!container->isFloating()); TitleBar->button(TitleBarButtonClose)->setVisible(!container->isFloating());
TitleBar->button(TitleBarButtonAutoHide)->setVisible(!container->isFloating() && allDockWidgetsFocusable()); TitleBar->button(TitleBarButtonAutoHide)->setVisible(!container->isFloating());
// Undock and tabs should never show when auto hidden // Undock and tabs should never show when auto hidden
TitleBar->button(TitleBarButtonUndock)->setVisible(!container->isFloating() && !_this->isAutoHide()); TitleBar->button(TitleBarButtonUndock)->setVisible(!container->isFloating() && !_this->isAutoHide());
TitleBar->button(TitleBarButtonTabsMenu)->setVisible(!_this->isAutoHide()); TitleBar->button(TitleBarButtonTabsMenu)->setVisible(!_this->isAutoHide());
@ -395,25 +390,12 @@ void DockAreaWidgetPrivate::updateTitleBarButtonVisibility(bool IsTopLevel)
else else
{ {
TitleBar->button(TitleBarButtonClose)->setVisible(true); TitleBar->button(TitleBarButtonClose)->setVisible(true);
TitleBar->button(TitleBarButtonAutoHide)->setVisible(allDockWidgetsFocusable()); TitleBar->button(TitleBarButtonAutoHide)->setVisible(true);
TitleBar->button(TitleBarButtonUndock)->setVisible(!_this->isAutoHide()); TitleBar->button(TitleBarButtonUndock)->setVisible(!_this->isAutoHide());
TitleBar->button(TitleBarButtonTabsMenu)->setVisible(!_this->isAutoHide()); TitleBar->button(TitleBarButtonTabsMenu)->setVisible(!_this->isAutoHide());
} }
} }
bool DockAreaWidgetPrivate::allDockWidgetsFocusable() const
{
for (const auto &dockWidget : _this->dockWidgets())
{
if (!dockWidget->features().testFlag(CDockWidget::DockWidgetFocusable))
{
return false;
}
}
return true;
}
//============================================================================ //============================================================================
CDockAreaWidget::CDockAreaWidget(CDockManager* DockManager, CDockContainerWidget* parent) : CDockAreaWidget::CDockAreaWidget(CDockManager* DockManager, CDockContainerWidget* parent) :
@ -1099,6 +1081,12 @@ void CDockAreaWidget::closeArea()
//============================================================================ //============================================================================
void CDockAreaWidget::toggleAutoHideArea(bool Enable) void CDockAreaWidget::toggleAutoHideArea(bool Enable)
{ {
if (!Enable)
{
autoHideDockContainer()->moveContentsToParent();
return;
}
const auto area = dockContainer()->calculateSideTabBarArea(this); const auto area = dockContainer()->calculateSideTabBarArea(this);
if (dockManager()->testConfigFlag(CDockManager::AutoHideButtonTogglesArea)) if (dockManager()->testConfigFlag(CDockManager::AutoHideButtonTogglesArea))
@ -1110,7 +1098,7 @@ void CDockAreaWidget::toggleAutoHideArea(bool Enable)
continue; continue;
} }
onAutoHideToggleRequested(DockWidget, !isAutoHide(), area); dockContainer()->createAndInitializeAutoHideDockWidgetContainer(area, DockWidget, DockWidget->autoHideInsertOrder());
} }
} }
else else
@ -1120,22 +1108,10 @@ void CDockAreaWidget::toggleAutoHideArea(bool Enable)
{ {
return; return;
} }
onAutoHideToggleRequested(DockWidget, !isAutoHide(), area); dockContainer()->createAndInitializeAutoHideDockWidgetContainer(area, DockWidget, DockWidget->autoHideInsertOrder());
} }
} }
//============================================================================
void CDockAreaWidget::onAutoHideToggleRequested(CDockWidget* DockWidget, bool Enable, CDockWidgetSideTab::SideTabBarArea area)
{
if (Enable)
{
dockContainer()->createAndInitializeAutoHideDockWidgetContainer(area, DockWidget, DockWidget->autoHideInsertOrder());
}
else
{
autoHideDockContainer()->moveContentsToParent();
}
}
//============================================================================ //============================================================================
void CDockAreaWidget::closeOtherAreas() void CDockAreaWidget::closeOtherAreas()

View File

@ -169,11 +169,6 @@ protected:
protected Q_SLOTS: protected Q_SLOTS:
void toggleView(bool Open); void toggleView(bool Open);
/**
* Auto hides the dock area and all dock widgets in this area
*/
void onAutoHideToggleRequested(CDockWidget* DockWidget, bool Enable, CDockWidgetSideTab::SideTabBarArea area);
public: public:
using Super = QFrame; using Super = QFrame;

View File

@ -234,6 +234,7 @@ public:
TopSideBarPrioritizeIconOnly = 0x20, //!< If the flag is set top 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 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 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.
DefaultAutoHideConfig = AutoHideFeatureEnabled DefaultAutoHideConfig = AutoHideFeatureEnabled
| DockAreaHasAutoHideButton | DockAreaHasAutoHideButton

View File

@ -35,15 +35,11 @@
#include "DockAreaWidget.h" #include "DockAreaWidget.h"
#include "DockManager.h" #include "DockManager.h"
#include "ElidingLabel.h"
#include "DockWidget.h" #include "DockWidget.h"
namespace ads namespace ads
{ {
using tTabLabel = CVerticalElidingLabel;
/** /**
* Private data class of CDockWidgetTab class (pimpl) * Private data class of CDockWidgetTab class (pimpl)
*/ */
@ -141,34 +137,35 @@ void CDockWidgetSideTab::updateOrientationAndSpacing(SideTabBarArea area)
{ {
setOrientation((area == Bottom || area == Top) ? Qt::Horizontal : Qt::Vertical); setOrientation((area == Bottom || area == Top) ? Qt::Horizontal : Qt::Vertical);
/*if (CDockManager::testConfigFlag(CDockManager::LeftSideBarPrioritizeIconOnly) && area == Left) if (icon().isNull())
{ {
d->TitleLabel->hide(); return;
d->TitleLayout->setContentsMargins(0, 0, 0, 0); }
d->IconLabel->setContentsMargins(Spacing / 2, Spacing / 2, Spacing / 2, Spacing / 2);
if (CDockManager::testConfigFlag(CDockManager::LeftSideBarPrioritizeIconOnly) && area == Left)
{
setText("");
setOrientation(Qt::Horizontal);
return; return;
} }
if (CDockManager::testConfigFlag(CDockManager::RightSideBarPrioritizeIconOnly) && area == Right) if (CDockManager::testConfigFlag(CDockManager::RightSideBarPrioritizeIconOnly) && area == Right)
{ {
d->TitleLabel->hide(); setText("");
d->TitleLayout->setContentsMargins(0, 0, 0, 0); setOrientation(Qt::Horizontal);
d->IconLabel->setContentsMargins(Spacing / 2, Spacing / 2, Spacing, Spacing / 2);
return; return;
} }
if (CDockManager::testConfigFlag(CDockManager::BottomSideBarPrioritizeIconOnly) && area == Bottom) if (CDockManager::testConfigFlag(CDockManager::BottomSideBarPrioritizeIconOnly) && area == Bottom)
{ {
d->TitleLabel->hide(); setText("");
d->TitleLayout->setContentsMargins(0, 0, 0, 0); setOrientation(Qt::Horizontal);
d->IconLabel->setContentsMargins(Spacing / 2, Spacing / 2, Spacing / 2, Spacing);
return; return;
} }
if (CDockManager::testConfigFlag(CDockManager::TopSideBarPrioritizeIconOnly) && area == Top) if (CDockManager::testConfigFlag(CDockManager::TopSideBarPrioritizeIconOnly) && area == Top)
{ {
d->TitleLabel->hide(); setText("");
d->TitleLayout->setContentsMargins(0, 0, 0, 0); setOrientation(Qt::Horizontal);
d->IconLabel->setContentsMargins(Spacing / 2, Spacing / 2, Spacing / 2, Spacing / 2);
return; return;
}*/ }
} }

View File

@ -85,7 +85,6 @@ public:
/** /**
* Default Constructor * Default Constructor
* param[in] DockWidget The dock widget this title bar belongs to * param[in] DockWidget The dock widget this title bar belongs to
* param[in] Orientation Horizontal or vertical orientation
* param[in] parent The parent widget of this title bar * param[in] parent The parent widget of this title bar
*/ */
CDockWidgetSideTab(CDockWidget* DockWidget, QWidget* parent = nullptr); CDockWidgetSideTab(CDockWidget* DockWidget, QWidget* parent = nullptr);

View File

@ -2,164 +2,166 @@
* Default style sheet on Windows Platforms * Default style sheet on Windows Platforms
*/ */
ads--CDockContainerWidget { ads--CDockContainerWidget {
background: palette(window); background: palette(window);
} }
ads--CDockContainerWidget > QSplitter{ ads--CDockContainerWidget > QSplitter {
padding: 1 0 1 0; padding: 1 0 1 0;
} }
ads--CDockContainerWidget ads--CDockSplitter::handle { ads--CDockContainerWidget ads--CDockSplitter::handle {
background: palette(dark); background: palette(dark);
} }
ads--CDockAreaWidget { ads--CDockAreaWidget {
background: palette(window); background: palette(window);
border: 1px solid white; border: 1px solid white;
} }
ads--CDockWidgetTab { ads--CDockWidgetTab {
background: palette(window); background: palette(window);
border-color: palette(light); border-color: palette(light);
border-style: solid; border-style: solid;
border-width: 0 1px 0 0; border-width: 0 1px 0 0;
padding: 0 0px; padding: 0 0px;
} }
ads--CDockWidgetTab[activeTab="true"] { ads--CDockWidgetTab[activeTab="true"] {
background: qlineargradient(spread : pad, x1 : 0, y1 : 0, x2 : 0, y2 : 0.5, stop : 0 background: qlineargradient(
palette(window), stop:1 palette(light)); spread: pad,
/*background: palette(highlight);*/ x1: 0,
y1: 0,
x2: 0,
y2: 0.5,
stop: 0 palette(window),
stop: 1 palette(light)
);
/*background: palette(highlight);*/
} }
ads--CDockWidgetTab QLabel { ads--CDockWidgetTab QLabel {
color: palette(dark); color: palette(dark);
} }
ads--CDockWidgetTab[activeTab="true"] QLabel { ads--CDockWidgetTab[activeTab="true"] QLabel {
color: palette(foreground); color: palette(foreground);
} }
ads--CDockWidget { ads--CDockWidget {
background: palette(light); background: palette(light);
border-color: palette(light); border-color: palette(light);
border-style: solid; border-style: solid;
border-width: 1px 0 0 0; border-width: 1px 0 0 0;
} }
ads--CTitleBarButton { ads--CTitleBarButton {
padding: 0px 0px; padding: 0px 0px;
} }
QScrollArea#dockWidgetScrollArea { QScrollArea#dockWidgetScrollArea {
padding: 0px; padding: 0px;
border: none; border: none;
} }
#tabCloseButton { #tabCloseButton {
margin-top: 2px; margin-top: 2px;
background: none; background: none;
border: none; border: none;
padding: 0px -2px; padding: 0px -2px;
qproperty-icon: url(:/ads/images/close-button.svg), qproperty-icon: url(:/ads/images/close-button.svg),
url(:/ads/images/close-button-disabled.svg) disabled; url(:/ads/images/close-button-disabled.svg) disabled;
qproperty-iconSize: 16px; qproperty-iconSize: 16px;
} }
#tabCloseButton:hover { #tabCloseButton:hover {
border: 1px solid rgba(0, 0, 0, 32); border: 1px solid rgba(0, 0, 0, 32);
background: rgba(0, 0, 0, 16); background: rgba(0, 0, 0, 16);
} }
#tabCloseButton:pressed { #tabCloseButton:pressed {
background: rgba(0, 0, 0, 32); background: rgba(0, 0, 0, 32);
} }
#tabsMenuButton::menu-indicator { #tabsMenuButton::menu-indicator {
image: none; image: none;
} }
#tabsMenuButton { #tabsMenuButton {
qproperty-icon: url(:/ads/images/tabs-menu-button.svg); qproperty-icon: url(:/ads/images/tabs-menu-button.svg);
qproperty-iconSize: 16px; qproperty-iconSize: 16px;
} }
#dockAreaCloseButton { #dockAreaCloseButton {
qproperty-icon: url(:/ads/images/close-button.svg), qproperty-icon: url(:/ads/images/close-button.svg),
url(:/ads/images/close-button-disabled.svg) disabled; url(:/ads/images/close-button-disabled.svg) disabled;
qproperty-iconSize: 16px; qproperty-iconSize: 16px;
} }
#detachGroupButton { #detachGroupButton {
qproperty-icon: url(:/ads/images/detach-button.svg), qproperty-icon: url(:/ads/images/detach-button.svg),
url(:/ads/images/detach-button-disabled.svg) disabled; url(:/ads/images/detach-button-disabled.svg) disabled;
qproperty-iconSize: 16px; qproperty-iconSize: 16px;
} }
/*----------------------------------------------------------------------------- /*-----------------------------------------------------------------------------
* Styling of auto hide functionality * Styling of auto hide functionality
*---------------------------------------------------------------------------- *----------------------------------------------------------------------------
*/ */
ads--CDockWidgetSideTab { ads--CDockWidgetSideTab {
/*background: palette(window);*/ /*background: palette(window);*/
qproperty-iconSize: 16px 16px;/* this is optional in case you would like to change icon size*/ qproperty-iconSize: 16px 16px; /* this is optional in case you would like to change icon size*/
} }
ads--CDockWidgetSideTab[sideTabBarArea="0"] { ads--CDockWidgetSideTab[sideTabBarArea="0"] {
/*border-right: 1px solid white;*/ border-top: 3px solid grey;
border-right: 1px solid white;
} }
ads--CDockWidgetSideTab[sideTabBarArea="1"] { ads--CDockWidgetSideTab[sideTabBarArea="1"] {
/*border-bottom: 1px solid white;*/ border-left: 3px solid grey;
border-bottom: 1px solid white;
} }
ads--CDockWidgetSideTab[sideTabBarArea="2"] { ads--CDockWidgetSideTab[sideTabBarArea="2"] {
border-bottom: 1px solid white; border-right: 3px solid grey;
border-bottom: 1px solid white;
} }
ads--CDockWidgetSideTab[sideTabBarArea="3"] { ads--CDockWidgetSideTab[sideTabBarArea="3"] {
border-right: 1px solid white; border-bottom: 3px solid grey;
border-right: 1px solid white;
} }
ads--CDockWidgetSideTab:hover[sideTabBarArea="0"] { ads--CDockWidgetSideTab:hover[sideTabBarArea="0"] {
border-top: 3px solid palette(highlight);
} }
ads--CDockWidgetSideTab:hover[sideTabBarArea="1"] { ads--CDockWidgetSideTab:hover[sideTabBarArea="1"] {
border-left: 3px solid palette(highlight);
} }
ads--CDockWidgetSideTab:hover[sideTabBarArea="2"] { ads--CDockWidgetSideTab:hover[sideTabBarArea="2"] {
border-right: 3px solid palette(highlight);
} }
ads--CDockWidgetSideTab:hover[sideTabBarArea="3"] { ads--CDockWidgetSideTab:hover[sideTabBarArea="3"] {
border-bottom: 3px solid palette(highlight);
}
ads--CDockWidgetSideTab:hover[sideTabBarArea="0"][activeTab="true"] {
} }
ads--CDockWidgetSideTab[sideTabBarArea="0"][activeTab="true"] { ads--CDockWidgetSideTab[sideTabBarArea="0"][activeTab="true"] {
border-top: 3px solid palette(highlight);
} }
ads--CDockWidgetSideTab[sideTabBarArea="1"][activeTab="true"] { ads--CDockWidgetSideTab[sideTabBarArea="1"][activeTab="true"] {
border-left: 3px solid palette(highlight);
} }
ads--CDockWidgetSideTab[sideTabBarArea="2"][activeTab="true"] { ads--CDockWidgetSideTab[sideTabBarArea="2"][activeTab="true"] {
border-right: 3px solid palette(highlight);
} }
ads--CDockWidgetSideTab[sideTabBarArea="3"][activeTab="true"] { ads--CDockWidgetSideTab[sideTabBarArea="3"][activeTab="true"] {
border-bottom: 3px solid palette(highlight);
} }
/* /*
@ -195,7 +197,7 @@ ads--CAutoHideDockContainer #dockAreaAutoHideButton
} }
#autoHideTitleLabel { #autoHideTitleLabel {
padding-left: 4px; padding-left: 4px;
} }
ads--CResizeHandle ads--CResizeHandle

View File

@ -43,7 +43,10 @@ ads--CDockWidgetTab[activeTab="true"] QLabel {
color: palette(foreground); color: palette(foreground);
} }
/* Side tab styling */ /*-----------------------------------------------------------------------------
* Styling of auto hide functionality
*----------------------------------------------------------------------------
*/
ads--CDockWidgetSideTab { ads--CDockWidgetSideTab {
background: palette(window); background: palette(window);
qproperty-iconSize: 16px 16px;/* this is optional in case you would like to change icon size*/ qproperty-iconSize: 16px 16px;/* this is optional in case you would like to change icon size*/
@ -54,17 +57,17 @@ ads--CDockWidgetSideTab[sideTabBarArea="0"] {
border-right: 1px solid white; border-right: 1px solid white;
} }
ads--CDockWidgetSideTab[sideTabBarArea="1"],[sideTabBarArea="2"] { ads--CDockWidgetSideTab[sideTabBarArea="1"] {
border-left: 3px solid grey; border-left: 3px solid grey;
border-bottom: 1px solid white; border-bottom: 1px solid white;
} }
ads--CDockWidgetSideTab[sideTabBarArea="3"],[sideTabBarArea="4"] { ads--CDockWidgetSideTab[sideTabBarArea="2"] {
border-right: 3px solid grey; border-right: 3px solid grey;
border-bottom: 1px solid white; border-bottom: 1px solid white;
} }
ads--CDockWidgetSideTab[sideTabBarArea="5"] { ads--CDockWidgetSideTab[sideTabBarArea="3"] {
border-bottom: 3px solid grey; border-bottom: 3px solid grey;
border-right: 1px solid white; border-right: 1px solid white;
} }
@ -73,38 +76,33 @@ ads--CDockWidgetSideTab:hover[sideTabBarArea="0"] {
border-top: 3px solid palette(highlight); border-top: 3px solid palette(highlight);
} }
ads--CDockWidgetSideTab:hover[sideTabBarArea="1"],:hover[sideTabBarArea="2"] { ads--CDockWidgetSideTab:hover[sideTabBarArea="1"] {
border-left: 3px solid palette(highlight); border-left: 3px solid palette(highlight);
} }
ads--CDockWidgetSideTab:hover[sideTabBarArea="3"],:hover[sideTabBarArea="4"] { ads--CDockWidgetSideTab:hover[sideTabBarArea="2"] {
border-right: 3px solid palette(highlight); border-right: 3px solid palette(highlight);
} }
ads--CDockWidgetSideTab:hover[sideTabBarArea="5"] { ads--CDockWidgetSideTab:hover[sideTabBarArea="3"] {
border-bottom: 3px solid palette(highlight); border-bottom: 3px solid palette(highlight);
} }
ads--CDockWidgetSideTab:hover[sideTabBarArea="0"][activeTab="true"] {
border-top: 3px solid palette(highlight);
}
ads--CDockWidgetSideTab[sideTabBarArea="0"][activeTab="true"] { ads--CDockWidgetSideTab[sideTabBarArea="0"][activeTab="true"] {
border-top: 3px solid palette(highlight); border-top: 3px solid palette(highlight);
} }
ads--CDockWidgetSideTab[sideTabBarArea="1"][activeTab="true"],[sideTabBarArea="2"][activeTab="true"] { ads--CDockWidgetSideTab[sideTabBarArea="1"][activeTab="true"] {
border-left: 3px solid palette(highlight); border-left: 3px solid palette(highlight);
} }
ads--CDockWidgetSideTab[sideTabBarArea="3"][activeTab="true"],[sideTabBarArea="4"][focused="true"] { ads--CDockWidgetSideTab[sideTabBarArea="2"][activeTab="true"] {
border-right: 3px solid palette(highlight); border-right: 3px solid palette(highlight);
} }
ads--CDockWidgetSideTab[sideTabBarArea="5"][activeTab="true"] { ads--CDockWidgetSideTab[sideTabBarArea="3"][activeTab="true"] {
border-bottom: 3px solid palette(highlight); border-bottom: 3px solid palette(highlight);
} }
/* Side tab styling */
ads--CDockWidget { ads--CDockWidget {
background: palette(light); background: palette(light);

View File

@ -36,7 +36,10 @@ ads--CDockWidgetTab[activeTab="true"] QLabel {
color: palette(foreground); color: palette(foreground);
} }
/* Side tab styling */ /*-----------------------------------------------------------------------------
* Styling of auto hide functionality
*----------------------------------------------------------------------------
*/
ads--CDockWidgetSideTab { ads--CDockWidgetSideTab {
background: palette(window); background: palette(window);
qproperty-iconSize: 16px 16px;/* this is optional in case you would like to change icon size*/ qproperty-iconSize: 16px 16px;/* this is optional in case you would like to change icon size*/
@ -47,17 +50,17 @@ ads--CDockWidgetSideTab[sideTabBarArea="0"] {
border-right: 1px solid white; border-right: 1px solid white;
} }
ads--CDockWidgetSideTab[sideTabBarArea="1"],[sideTabBarArea="2"] { ads--CDockWidgetSideTab[sideTabBarArea="1"] {
border-left: 3px solid grey; border-left: 3px solid grey;
border-bottom: 1px solid white; border-bottom: 1px solid white;
} }
ads--CDockWidgetSideTab[sideTabBarArea="3"],[sideTabBarArea="4"] { ads--CDockWidgetSideTab[sideTabBarArea="2"] {
border-right: 3px solid grey; border-right: 3px solid grey;
border-bottom: 1px solid white; border-bottom: 1px solid white;
} }
ads--CDockWidgetSideTab[sideTabBarArea="5"] { ads--CDockWidgetSideTab[sideTabBarArea="3"] {
border-bottom: 3px solid grey; border-bottom: 3px solid grey;
border-right: 1px solid white; border-right: 1px solid white;
} }
@ -66,38 +69,33 @@ ads--CDockWidgetSideTab:hover[sideTabBarArea="0"] {
border-top: 3px solid palette(highlight); border-top: 3px solid palette(highlight);
} }
ads--CDockWidgetSideTab:hover[sideTabBarArea="1"],:hover[sideTabBarArea="2"] { ads--CDockWidgetSideTab:hover[sideTabBarArea="1"] {
border-left: 3px solid palette(highlight); border-left: 3px solid palette(highlight);
} }
ads--CDockWidgetSideTab:hover[sideTabBarArea="3"],:hover[sideTabBarArea="4"] { ads--CDockWidgetSideTab:hover[sideTabBarArea="2"] {
border-right: 3px solid palette(highlight); border-right: 3px solid palette(highlight);
} }
ads--CDockWidgetSideTab:hover[sideTabBarArea="5"] { ads--CDockWidgetSideTab:hover[sideTabBarArea="3"] {
border-bottom: 3px solid palette(highlight); border-bottom: 3px solid palette(highlight);
} }
ads--CDockWidgetSideTab:hover[sideTabBarArea="0"][activeTab="true"] {
border-top: 3px solid palette(highlight);
}
ads--CDockWidgetSideTab[sideTabBarArea="0"][activeTab="true"] { ads--CDockWidgetSideTab[sideTabBarArea="0"][activeTab="true"] {
border-top: 3px solid palette(highlight); border-top: 3px solid palette(highlight);
} }
ads--CDockWidgetSideTab[sideTabBarArea="1"][activeTab="true"],[sideTabBarArea="2"][activeTab="true"] { ads--CDockWidgetSideTab[sideTabBarArea="1"][activeTab="true"] {
border-left: 3px solid palette(highlight); border-left: 3px solid palette(highlight);
} }
ads--CDockWidgetSideTab[sideTabBarArea="3"][activeTab="true"],[sideTabBarArea="4"][focused="true"] { ads--CDockWidgetSideTab[sideTabBarArea="2"][activeTab="true"] {
border-right: 3px solid palette(highlight); border-right: 3px solid palette(highlight);
} }
ads--CDockWidgetSideTab[sideTabBarArea="5"][activeTab="true"] { ads--CDockWidgetSideTab[sideTabBarArea="3"][activeTab="true"] {
border-bottom: 3px solid palette(highlight); border-bottom: 3px solid palette(highlight);
} }
/* Side tab styling */
ads--CDockWidget { ads--CDockWidget {
background: palette(light); background: palette(light);

View File

@ -44,7 +44,10 @@ ads--CDockWidgetTab[activeTab="true"] QLabel {
color: palette(foreground); color: palette(foreground);
} }
/* Side tab styling */ /*-----------------------------------------------------------------------------
* Styling of auto hide functionality
*----------------------------------------------------------------------------
*/
ads--CDockWidgetSideTab { ads--CDockWidgetSideTab {
background: palette(window); background: palette(window);
qproperty-iconSize: 16px 16px;/* this is optional in case you would like to change icon size*/ qproperty-iconSize: 16px 16px;/* this is optional in case you would like to change icon size*/
@ -55,17 +58,17 @@ ads--CDockWidgetSideTab[sideTabBarArea="0"] {
border-right: 1px solid white; border-right: 1px solid white;
} }
ads--CDockWidgetSideTab[sideTabBarArea="1"],[sideTabBarArea="2"] { ads--CDockWidgetSideTab[sideTabBarArea="1"] {
border-left: 3px solid grey; border-left: 3px solid grey;
border-bottom: 1px solid white; border-bottom: 1px solid white;
} }
ads--CDockWidgetSideTab[sideTabBarArea="3"],[sideTabBarArea="4"] { ads--CDockWidgetSideTab[sideTabBarArea="2"] {
border-right: 3px solid grey; border-right: 3px solid grey;
border-bottom: 1px solid white; border-bottom: 1px solid white;
} }
ads--CDockWidgetSideTab[sideTabBarArea="5"] { ads--CDockWidgetSideTab[sideTabBarArea="3"] {
border-bottom: 3px solid grey; border-bottom: 3px solid grey;
border-right: 1px solid white; border-right: 1px solid white;
} }
@ -74,38 +77,33 @@ ads--CDockWidgetSideTab:hover[sideTabBarArea="0"] {
border-top: 3px solid palette(highlight); border-top: 3px solid palette(highlight);
} }
ads--CDockWidgetSideTab:hover[sideTabBarArea="1"],:hover[sideTabBarArea="2"] { ads--CDockWidgetSideTab:hover[sideTabBarArea="1"] {
border-left: 3px solid palette(highlight); border-left: 3px solid palette(highlight);
} }
ads--CDockWidgetSideTab:hover[sideTabBarArea="3"],:hover[sideTabBarArea="4"] { ads--CDockWidgetSideTab:hover[sideTabBarArea="2"] {
border-right: 3px solid palette(highlight); border-right: 3px solid palette(highlight);
} }
ads--CDockWidgetSideTab:hover[sideTabBarArea="5"] { ads--CDockWidgetSideTab:hover[sideTabBarArea="3"] {
border-bottom: 3px solid palette(highlight); border-bottom: 3px solid palette(highlight);
} }
ads--CDockWidgetSideTab:hover[sideTabBarArea="0"][activeTab="true"] {
border-top: 3px solid palette(highlight);
}
ads--CDockWidgetSideTab[sideTabBarArea="0"][activeTab="true"] { ads--CDockWidgetSideTab[sideTabBarArea="0"][activeTab="true"] {
border-top: 3px solid palette(highlight); border-top: 3px solid palette(highlight);
} }
ads--CDockWidgetSideTab[sideTabBarArea="1"][activeTab="true"],[sideTabBarArea="2"][activeTab="true"] { ads--CDockWidgetSideTab[sideTabBarArea="1"][activeTab="true"] {
border-left: 3px solid palette(highlight); border-left: 3px solid palette(highlight);
} }
ads--CDockWidgetSideTab[sideTabBarArea="3"][activeTab="true"],[sideTabBarArea="4"][focused="true"] { ads--CDockWidgetSideTab[sideTabBarArea="2"][activeTab="true"] {
border-right: 3px solid palette(highlight); border-right: 3px solid palette(highlight);
} }
ads--CDockWidgetSideTab[sideTabBarArea="5"][activeTab="true"] { ads--CDockWidgetSideTab[sideTabBarArea="3"][activeTab="true"] {
border-bottom: 3px solid palette(highlight); border-bottom: 3px solid palette(highlight);
} }
/* Side tab styling */
ads--CDockWidget { ads--CDockWidget {
background: palette(light); background: palette(light);