mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-12-26 08:01:32 +08:00
Merge branch 'duerr-ndt-auto_hide_feature' into auto_hide_feature
This commit is contained in:
commit
a8a40f0bee
@ -633,7 +633,7 @@ d->DockManager = new CDockManager(this);
|
||||
|
||||
### Adding Auto Hide Widgets
|
||||
|
||||
Adding an overlay widget is similar to adding a dock widget, simply call `dockManager->addAutoHideDockWidget`.
|
||||
Adding an auto hide widget is similar to adding a dock widget, simply call `dockManager->addAutoHideDockWidget`.
|
||||
|
||||
```c++
|
||||
d->DockManager = new CDockManager(this);
|
||||
@ -646,17 +646,17 @@ See `autohide` example to learn how it works.
|
||||
|
||||
### Configuration Flags For Auto Hide Widgets
|
||||
|
||||
- `DockContainerHasLeftSideBar`, `DockContainerHasRightSideBar`, `DockContainerHasBottomSideBar` -> Enabling each of these enables the side bar at each location. Disabling any of them would mean that the widget cannot be added at that location, so it would be added at the next available location. E.g. If you only enable `DockContainerHasRightSideBar` and `DockContainerHasBottomSideBar` then it will be added to the bottom side bar or right side bar respectively. If none of these are enabled, the auto hide button will not be added, as at least one of them must be enabled to work.
|
||||
- `DockContainerHasTopSideBar`,`DockContainerHasLeftSideBar`, `DockContainerHasRightSideBar`, `DockContainerHasBottomSideBar` -> Enabling each of these enables the side bar at each location. Disabling any of them would mean that the widget cannot be added at that location, so it would be added at the next available location. E.g. If you only enable `DockContainerHasRightSideBar` and `DockContainerHasBottomSideBar` then it will be added to the bottom side bar or right side bar respectively. If none of these are enabled, the auto hide button will not be added, as at least one of them must be enabled to work.
|
||||
- `DockAreaHasAutoHideButton` -> Adds the auto hide button to the title bar of the dock area
|
||||
- `LeftSideBarPrioritizeIconOnly`, `RightSideBarPrioritizeIconOnly`, `BottomSideBarPrioritizeIconOnly` -> If this is set, the side bar this is enabled with will prioritize showing an icon only, as opposed to an icon and text. This is set per side bar, so if you only enable `LeftSideBarPrioritizeIconOnly`, the right and bottom side bars will still show the icon and the text. This is only relevant if an icon is set, otherwise it will only show text as usual.
|
||||
- `TopSideBarPrioritizeIconOnly`, `LeftSideBarPrioritizeIconOnly`, `RightSideBarPrioritizeIconOnly`, `BottomSideBarPrioritizeIconOnly` -> If this is set, the side bar this is enabled with will prioritize showing an icon only, as opposed to an icon and text. This is set per side bar, so if you only enable `LeftSideBarPrioritizeIconOnly`, the right and bottom side bars will still show the icon and the text. This is only relevant if an icon is set, otherwise it will only show text as usual.
|
||||
- `AutoHideDockAreaHasTitle` -> Adds the title of the dock window where the title bar would be.
|
||||
- `DefaultAutoHideConfig` -> Enables `DockContainerHasLeftSideBar`, `DockContainerHasRightSideBar`, `DockContainerHasBottomSideBar`, `DockAreaHasAutoHideButton`, `AutoHideDockAreaHasTitle`
|
||||
- `DefaultAutoHideConfig` -> Enables `DockContainerHasTopSideBar`, `DockContainerHasLeftSideBar`, `DockContainerHasRightSideBar`, `DockContainerHasBottomSideBar`, `DockAreaHasAutoHideButton`, `AutoHideDockAreaHasTitle`
|
||||
|
||||
### Limitations
|
||||
|
||||
- Currently the `LeftBottom` and `RightBottom` areas can only be added programatically, and not through the pin icon. These are used if you'd like to add a new dock widget separated from the normal dock areas.
|
||||
|
||||
- Adding a `DockWidget` (e.g. via `addDockWidget`) to an overlayed `DockArea` that already has a dockwidget is undefined behavior. An overlayed dock area does not have tabs and does not support more than one `DockWidget` in it's area. If you want to add a `DockWidget` to a `DockArea` that *could* be overlayed, check first if it's overlayed via `CDockArea::isAutoHide` and handle it accordingly (typically by adding the overlay dock widget as a side tab instead of to the area).
|
||||
- Adding a `DockWidget` (e.g. via `addDockWidget`) to an `DockArea` in an Auto Hide Widget that already has a dockwidget is undefined behavior. An overlayed dock area does not have tabs and does not support more than one `DockWidget` in it's area. If you want to add a `DockWidget` to a `DockArea` that *could* be in an auto hidden widget, check first if it's auto hidden via `CDockArea::isAutoHide` and handle it accordingly (typically by adding the overlay dock widget as a side tab instead of to the area).
|
||||
|
||||
## Styling
|
||||
|
||||
|
@ -80,6 +80,10 @@ struct AutoHideDockContainerPrivate
|
||||
{
|
||||
return BottomDockWidgetArea;
|
||||
}
|
||||
case CDockWidgetSideTab::Top:
|
||||
{
|
||||
return TopDockWidgetArea;
|
||||
}
|
||||
}
|
||||
|
||||
return LeftDockWidgetArea;
|
||||
@ -106,6 +110,10 @@ struct AutoHideDockContainerPrivate
|
||||
{
|
||||
return QPoint(_this->width() / 2, _this->height() - 1);
|
||||
}
|
||||
case CDockWidgetSideTab::Top:
|
||||
{
|
||||
return QPoint(_this->width() / 2, 1);
|
||||
}
|
||||
}
|
||||
|
||||
return QPoint();
|
||||
@ -125,6 +133,11 @@ struct AutoHideDockContainerPrivate
|
||||
return QRect(QPoint(topLeft.x(), topLeft.y() - handleSize), QSize(rect.size().width(), rect.size().height() + handleSize));
|
||||
}
|
||||
|
||||
if (SideTabBarArea == CDockWidgetSideTab::Top)
|
||||
{
|
||||
return QRect(QPoint(topLeft.x(), topLeft.y()), QSize(rect.size().width(), rect.size().height() + handleSize));
|
||||
}
|
||||
|
||||
auto offset = 0;
|
||||
if (SideTabBarArea == CDockWidgetSideTab::SideTabBarArea::RightTop || SideTabBarArea == CDockWidgetSideTab::SideTabBarArea::RightBottom)
|
||||
{
|
||||
@ -150,7 +163,7 @@ CDockContainerWidget* CAutoHideDockContainer::parentContainer() const
|
||||
|
||||
//============================================================================
|
||||
CAutoHideDockContainer::CAutoHideDockContainer(CDockManager* DockManager, CDockWidgetSideTab::SideTabBarArea area, CDockContainerWidget* parent) :
|
||||
QSplitter(area == CDockWidgetSideTab::Bottom ? Qt::Orientation::Vertical : Qt::Orientation::Horizontal, parent),
|
||||
QSplitter((area == CDockWidgetSideTab::Bottom || area == CDockWidgetSideTab::Top) ? Qt::Orientation::Vertical : Qt::Orientation::Horizontal, parent),
|
||||
d(new AutoHideDockContainerPrivate(this))
|
||||
{
|
||||
d->DockManager = DockManager;
|
||||
@ -170,6 +183,12 @@ CAutoHideDockContainer::CAutoHideDockContainer(CDockManager* DockManager, CDockW
|
||||
|
||||
switch (area)
|
||||
{
|
||||
case CDockWidgetSideTab::Top:
|
||||
{
|
||||
addWidget(d->DockArea);
|
||||
addWidget(emptyWidget);
|
||||
break;
|
||||
}
|
||||
case CDockWidgetSideTab::LeftBottom:
|
||||
case CDockWidgetSideTab::LeftTop:
|
||||
{
|
||||
@ -192,13 +211,10 @@ CAutoHideDockContainer::CAutoHideDockContainer(CDockManager* DockManager, CDockW
|
||||
}
|
||||
}
|
||||
|
||||
updateMask();
|
||||
updateSize();
|
||||
updateMask();
|
||||
|
||||
parent->registerAutoHideWidget(this);
|
||||
|
||||
d->DockArea->installEventFilter(this);
|
||||
parent->installEventFilter(this);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
@ -231,8 +247,7 @@ CAutoHideDockContainer::~CAutoHideDockContainer()
|
||||
ADS_PRINT("~CAutoHideDockContainer");
|
||||
|
||||
// Remove event filter in case there are any queued messages
|
||||
d->DockArea->removeEventFilter(this);
|
||||
parent()->removeEventFilter(this);
|
||||
qApp->removeEventFilter(this);
|
||||
|
||||
if (d->DockManager)
|
||||
{
|
||||
@ -439,8 +454,13 @@ void CAutoHideDockContainer::collapseView(bool Enable)
|
||||
show();
|
||||
d->DockArea->show();
|
||||
d->DockWidget->show();
|
||||
updateSize();
|
||||
updateMask();
|
||||
d->DockManager->setDockWidgetFocused(d->DockWidget);
|
||||
qApp->installEventFilter(this);
|
||||
}
|
||||
|
||||
d->DockWidget->sideTabWidget()->updateStyle();
|
||||
}
|
||||
|
||||
|
||||
@ -470,6 +490,10 @@ bool CAutoHideDockContainer::areaExistsInConfig(CDockWidgetSideTab::SideTabBarAr
|
||||
{
|
||||
return CDockManager::testConfigFlag(CDockManager::DockContainerHasBottomSideBar);
|
||||
}
|
||||
case CDockWidgetSideTab::Top:
|
||||
{
|
||||
return CDockManager::testConfigFlag(CDockManager::DockContainerHasTopSideBar);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -1054,9 +1054,10 @@ bool DockContainerWidgetPrivate::restoreAutoHideDockArea(CDockingStateReader& s,
|
||||
}
|
||||
|
||||
CDockAreaWidget* DockArea = nullptr;
|
||||
CAutoHideDockContainer* dockContainer = nullptr;
|
||||
if (!Testing)
|
||||
{
|
||||
const auto dockContainer = new CAutoHideDockContainer(DockManager, area, _this);
|
||||
dockContainer = new CAutoHideDockContainer(DockManager, area, _this);
|
||||
if (!dockContainer->restoreState(s, Testing))
|
||||
{
|
||||
return false;
|
||||
@ -1108,6 +1109,11 @@ bool DockContainerWidgetPrivate::restoreAutoHideDockArea(CDockingStateReader& s,
|
||||
DockArea->autoHideDockContainer()->toggleView(!Closed);
|
||||
}
|
||||
|
||||
if (dockContainer && !dockContainer->dockWidget())
|
||||
{
|
||||
dockContainer->cleanupAndDelete();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1434,7 +1440,7 @@ CDockContainerWidget::CDockContainerWidget(CDockManager* DockManager, QWidget *p
|
||||
d->Layout->setContentsMargins(0, 0, 0, 0);
|
||||
d->Layout->setSpacing(0);
|
||||
d->Layout->setColumnStretch(1, 1);
|
||||
d->Layout->setRowStretch(0, 1);
|
||||
d->Layout->setRowStretch(1, 1);
|
||||
setLayout(d->Layout);
|
||||
|
||||
// The function d->newSplitter() accesses the config flags from dock
|
||||
@ -1517,17 +1523,22 @@ CAutoHideDockContainer* CDockContainerWidget::createAndInitializeAutoHideDockWid
|
||||
//============================================================================
|
||||
CDockWidgetSideTab::SideTabBarArea CDockContainerWidget::getDockAreaPosition(CDockAreaWidget* DockAreaWidget)
|
||||
{
|
||||
// Handle bottom case
|
||||
// Handle bottom case and top case
|
||||
// It's bottom if the width is wider than the height, and if it's below 50% of the window
|
||||
const auto dockWidgetFrameGeometry = DockAreaWidget->frameGeometry();
|
||||
const auto splitterCenter = rootSplitter()->mapToGlobal(rootSplitter()->frameGeometry().center());
|
||||
|
||||
if (dockWidgetFrameGeometry.width() > dockWidgetFrameGeometry.height()
|
||||
&& DockAreaWidget->mapToGlobal(dockWidgetFrameGeometry.topLeft()).y() > splitterCenter.y()
|
||||
&& CDockManager::testConfigFlag(CDockManager::DockContainerHasBottomSideBar))
|
||||
if (dockWidgetFrameGeometry.width() > dockWidgetFrameGeometry.height())
|
||||
{
|
||||
if (DockAreaWidget->mapToGlobal(dockWidgetFrameGeometry.topLeft()).y() > splitterCenter.y() && CDockManager::testConfigFlag(CDockManager::DockContainerHasBottomSideBar))
|
||||
{
|
||||
return CDockWidgetSideTab::Bottom;
|
||||
}
|
||||
if (CDockManager::testConfigFlag(CDockManager::DockContainerHasTopSideBar))
|
||||
{
|
||||
return CDockWidgetSideTab::Top;
|
||||
}
|
||||
}
|
||||
|
||||
// Then handle left and right
|
||||
const auto dockWidgetCenter = DockAreaWidget->mapToGlobal(dockWidgetFrameGeometry.center());
|
||||
@ -2034,7 +2045,7 @@ void CDockContainerWidget::createRootSplitter()
|
||||
return;
|
||||
}
|
||||
d->RootSplitter = d->newSplitter(Qt::Horizontal);
|
||||
d->Layout->addWidget(d->RootSplitter, 0, 1); // Add it to the center - the 0 and 2 indexes are used for the SideTabBar widgets
|
||||
d->Layout->addWidget(d->RootSplitter, 1, 1); // Add it to the center - the 0 and 2 indexes are used for the SideTabBar widgets
|
||||
}
|
||||
|
||||
|
||||
@ -2049,7 +2060,7 @@ void CDockContainerWidget::createSideTabBarWidgets()
|
||||
leftLayout->addStretch(1);
|
||||
d->SideTabBarWidgets[CDockWidgetSideTab::LeftBottom] = new CSideTabBar(this, Qt::Vertical);
|
||||
leftLayout->addWidget(d->SideTabBarWidgets[CDockWidgetSideTab::LeftBottom]);
|
||||
d->Layout->addLayout(leftLayout, 0, 0);
|
||||
d->Layout->addLayout(leftLayout, 1, 0);
|
||||
}
|
||||
|
||||
if (CDockManager::testConfigFlag(CDockManager::DockContainerHasRightSideBar))
|
||||
@ -2060,13 +2071,19 @@ void CDockContainerWidget::createSideTabBarWidgets()
|
||||
rightLayout->addStretch(1);
|
||||
d->SideTabBarWidgets[CDockWidgetSideTab::RightBottom] = new CSideTabBar(this, Qt::Vertical);
|
||||
rightLayout->addWidget(d->SideTabBarWidgets[CDockWidgetSideTab::RightBottom]);
|
||||
d->Layout->addLayout(rightLayout, 0, 2);
|
||||
d->Layout->addLayout(rightLayout, 1, 2);
|
||||
}
|
||||
|
||||
if (CDockManager::testConfigFlag(CDockManager::DockContainerHasBottomSideBar))
|
||||
{
|
||||
d->SideTabBarWidgets[CDockWidgetSideTab::Bottom] = new CSideTabBar(this, Qt::Horizontal);
|
||||
d->Layout->addWidget(d->SideTabBarWidgets[CDockWidgetSideTab::Bottom], 1, 1);
|
||||
d->Layout->addWidget(d->SideTabBarWidgets[CDockWidgetSideTab::Bottom], 2, 1);
|
||||
}
|
||||
|
||||
if (CDockManager::testConfigFlag(CDockManager::DockContainerHasTopSideBar))
|
||||
{
|
||||
d->SideTabBarWidgets[CDockWidgetSideTab::Top] = new CSideTabBar(this, Qt::Horizontal);
|
||||
d->Layout->addWidget(d->SideTabBarWidgets[CDockWidgetSideTab::Top], 0, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -229,15 +229,18 @@ public:
|
||||
DockContainerHasLeftSideBar = 0x01, //!< If the flag is set left side bar will prioritize showing icons only over text
|
||||
DockContainerHasRightSideBar = 0x02, //!< If the flag is set right side bar will prioritize showing icons only over text
|
||||
DockContainerHasBottomSideBar = 0x04, //!< If the flag is set right side bar will prioritize showing icons only over text
|
||||
DockAreaHasAutoHideButton = 0x08, //!< If the flag is set each dock area has a auto hide menu button
|
||||
LeftSideBarPrioritizeIconOnly = 0x10, //!< If the flag is set each container will have a left side bar
|
||||
RightSideBarPrioritizeIconOnly = 0x20, //!< If the flag is set each container will have a right side bar
|
||||
BottomSideBarPrioritizeIconOnly = 0x40, //!< If the flag is set bottom side bar will prioritize showing icons only over text
|
||||
AutoHideDockAreaHasTitle = 0x80, //!< If the flag is set overlay dock area title bar will show the window title
|
||||
DockContainerHasTopSideBar = 0x08, //!< If the flag is set right side bar will prioritize showing icons only over text
|
||||
DockAreaHasAutoHideButton = 0x10, //!< If the flag is set each dock area has a auto hide menu button
|
||||
LeftSideBarPrioritizeIconOnly = 0x20, //!< If the flag is set each container will have a left side bar
|
||||
RightSideBarPrioritizeIconOnly = 0x40, //!< If the flag is set each container will have a right side bar
|
||||
BottomSideBarPrioritizeIconOnly = 0x80, //!< If the flag is set bottom side bar will prioritize showing icons only over text
|
||||
TopSideBarPrioritizeIconOnly = 0x100, //!< If the flag is set bottom side bar will prioritize showing icons only over text
|
||||
AutoHideDockAreaHasTitle = 0x200, //!< If the flag is set overlay dock area title bar will show the window title
|
||||
|
||||
DefaultAutoHideConfig = DockContainerHasLeftSideBar
|
||||
| DockContainerHasRightSideBar
|
||||
| DockContainerHasBottomSideBar
|
||||
| DockContainerHasTopSideBar
|
||||
| DockAreaHasAutoHideButton
|
||||
| AutoHideDockAreaHasTitle, ///< the default configuration for left and right side bars
|
||||
};
|
||||
|
@ -248,7 +248,7 @@ void DockWidgetPrivate::updateParentDockArea()
|
||||
|
||||
void DockWidgetPrivate::closeAutoHideDockWidgetsIfNeeded()
|
||||
{
|
||||
if (_this->dockContainer() && _this->dockContainer()->openedDockWidgets().isEmpty())
|
||||
if (_this->dockContainer() && _this->dockContainer()->openedDockWidgets().isEmpty() && !_this->dockManager()->isRestoringState())
|
||||
{
|
||||
for (auto autoHideWidget : _this->dockContainer()->autoHideWidgets())
|
||||
{
|
||||
@ -1085,15 +1085,7 @@ void CDockWidget::onDockWidgetSideTabClicked()
|
||||
return;
|
||||
}
|
||||
|
||||
autoHideContainer->raise();
|
||||
autoHideContainer->toggleCollapseState();
|
||||
if (autoHideContainer->isVisible())
|
||||
{
|
||||
// d->DockManager->setDockWidgetFocused(this) does not
|
||||
// de focus the old widget, leading to the auto hide still being visible
|
||||
// even after clicking outside the auto hide.
|
||||
setFocus(Qt::ActiveWindowFocusReason);
|
||||
}
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
|
@ -106,7 +106,7 @@ struct DockWidgetSideTabPrivate
|
||||
}
|
||||
else if (Orientation == Qt::Horizontal)
|
||||
{
|
||||
TitleLayout->setContentsMargins(Spacing / 2, Spacing / 2, Spacing, Spacing);
|
||||
TitleLayout->setContentsMargins(Spacing / 2, Spacing, Spacing, Spacing);
|
||||
if (IconLabel)
|
||||
{
|
||||
IconLabel->setContentsMargins(Spacing / 2, Spacing / 2, 0, Spacing / 2);
|
||||
@ -276,7 +276,7 @@ void CDockWidgetSideTab::setOrientation(Qt::Orientation Orientation)
|
||||
//============================================================================
|
||||
void CDockWidgetSideTab::updateOrientationAndSpacing(SideTabBarArea area)
|
||||
{
|
||||
setOrientation(area == Bottom ? Qt::Horizontal : Qt::Vertical);
|
||||
setOrientation((area == Bottom || area == Top) ? Qt::Horizontal : Qt::Vertical);
|
||||
|
||||
d->updateContentsMargins();
|
||||
|
||||
@ -304,6 +304,13 @@ void CDockWidgetSideTab::updateOrientationAndSpacing(SideTabBarArea area)
|
||||
return;
|
||||
}
|
||||
if (CDockManager::testConfigFlag(CDockManager::BottomSideBarPrioritizeIconOnly) && area == Bottom)
|
||||
{
|
||||
d->TitleLabel->hide();
|
||||
d->TitleLayout->setContentsMargins(0, 0, 0, 0);
|
||||
d->IconLabel->setContentsMargins(Spacing / 2, Spacing / 2, Spacing / 2, Spacing);
|
||||
return;
|
||||
}
|
||||
if (CDockManager::testConfigFlag(CDockManager::TopSideBarPrioritizeIconOnly) && area == Top)
|
||||
{
|
||||
d->TitleLabel->hide();
|
||||
d->TitleLayout->setContentsMargins(0, 0, 0, 0);
|
||||
@ -315,6 +322,18 @@ void CDockWidgetSideTab::updateOrientationAndSpacing(SideTabBarArea area)
|
||||
}
|
||||
|
||||
|
||||
//============================================================================
|
||||
bool CDockWidgetSideTab::isActiveTab() const
|
||||
{
|
||||
if (d->DockWidget->autoHideDockContainer())
|
||||
{
|
||||
return d->DockWidget->autoHideDockContainer()->isVisible();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
//============================================================================
|
||||
CDockWidget* CDockWidgetSideTab::dockWidget() const
|
||||
{
|
||||
|
@ -52,6 +52,7 @@ class ADS_EXPORT CDockWidgetSideTab : public QFrame
|
||||
|
||||
Q_PROPERTY(SideTabBarArea sideTabBarArea READ sideTabBarArea)
|
||||
Q_PROPERTY(QSize iconSize READ iconSize WRITE setIconSize)
|
||||
Q_PROPERTY(bool activeTab READ isActiveTab)
|
||||
|
||||
private:
|
||||
DockWidgetSideTabPrivate* d; ///< private data (pimpl)
|
||||
@ -77,6 +78,7 @@ public:
|
||||
*/
|
||||
enum SideTabBarArea
|
||||
{
|
||||
Top,
|
||||
LeftTop,
|
||||
LeftBottom,
|
||||
RightTop,
|
||||
@ -138,6 +140,10 @@ public:
|
||||
*/
|
||||
void updateOrientationAndSpacing(SideTabBarArea area);
|
||||
|
||||
/**
|
||||
* Returns true, if this is the active tab. The tab is active if the auto hide widget is visible
|
||||
*/
|
||||
bool isActiveTab() const;
|
||||
|
||||
/**
|
||||
* returns the dock widget this belongs to
|
||||
|
@ -39,20 +39,69 @@ ads--CDockWidgetTab[activeTab="true"] QLabel {
|
||||
color: palette(foreground);
|
||||
}
|
||||
|
||||
/* Side tab styling */
|
||||
ads--CDockWidgetSideTab {
|
||||
background: palette(window);
|
||||
qproperty-iconSize: 16px 16px;/* this is optional in case you would like to change icon size*/
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab[sideTabBarArea="Left"] {
|
||||
ads--CDockWidgetSideTab[sideTabBarArea="0"] {
|
||||
border-top: 3px solid grey;
|
||||
border-right: 1px solid white;
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab[sideTabBarArea="1"],[sideTabBarArea="2"] {
|
||||
border-left: 3px solid grey;
|
||||
border-bottom: 1px solid white;
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab[sideTabBarArea="Right"] {
|
||||
ads--CDockWidgetSideTab[sideTabBarArea="3"],[sideTabBarArea="4"] {
|
||||
border-right: 3px solid grey;
|
||||
border-bottom: 1px solid white;
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab[sideTabBarArea="5"] {
|
||||
border-bottom: 3px solid grey;
|
||||
border-right: 1px solid white;
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab:hover[sideTabBarArea="0"] {
|
||||
border-top: 3px solid palette(highlight);
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab:hover[sideTabBarArea="1"],:hover[sideTabBarArea="2"] {
|
||||
border-left: 3px solid palette(highlight);
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab:hover[sideTabBarArea="3"],:hover[sideTabBarArea="4"] {
|
||||
border-right: 3px solid palette(highlight);
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab:hover[sideTabBarArea="5"] {
|
||||
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"] {
|
||||
border-top: 3px solid palette(highlight);
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab[sideTabBarArea="1"][activeTab="true"],[sideTabBarArea="2"][activeTab="true"] {
|
||||
border-left: 3px solid palette(highlight);
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab[sideTabBarArea="3"][activeTab="true"],[sideTabBarArea="4"][focused="true"] {
|
||||
border-right: 3px solid palette(highlight);
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab[sideTabBarArea="5"][activeTab="true"] {
|
||||
border-bottom: 3px solid palette(highlight);
|
||||
}
|
||||
/* Side tab styling */
|
||||
|
||||
ads--CDockWidget {
|
||||
background: palette(light);
|
||||
border-color: palette(light);
|
||||
|
@ -43,6 +43,69 @@ ads--CDockWidgetTab[activeTab="true"] QLabel {
|
||||
color: palette(foreground);
|
||||
}
|
||||
|
||||
/* Side tab styling */
|
||||
ads--CDockWidgetSideTab {
|
||||
background: palette(window);
|
||||
qproperty-iconSize: 16px 16px;/* this is optional in case you would like to change icon size*/
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab[sideTabBarArea="0"] {
|
||||
border-top: 3px solid grey;
|
||||
border-right: 1px solid white;
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab[sideTabBarArea="1"],[sideTabBarArea="2"] {
|
||||
border-left: 3px solid grey;
|
||||
border-bottom: 1px solid white;
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab[sideTabBarArea="3"],[sideTabBarArea="4"] {
|
||||
border-right: 3px solid grey;
|
||||
border-bottom: 1px solid white;
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab[sideTabBarArea="5"] {
|
||||
border-bottom: 3px solid grey;
|
||||
border-right: 1px solid white;
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab:hover[sideTabBarArea="0"] {
|
||||
border-top: 3px solid palette(highlight);
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab:hover[sideTabBarArea="1"],:hover[sideTabBarArea="2"] {
|
||||
border-left: 3px solid palette(highlight);
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab:hover[sideTabBarArea="3"],:hover[sideTabBarArea="4"] {
|
||||
border-right: 3px solid palette(highlight);
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab:hover[sideTabBarArea="5"] {
|
||||
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"] {
|
||||
border-top: 3px solid palette(highlight);
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab[sideTabBarArea="1"][activeTab="true"],[sideTabBarArea="2"][activeTab="true"] {
|
||||
border-left: 3px solid palette(highlight);
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab[sideTabBarArea="3"][activeTab="true"],[sideTabBarArea="4"][focused="true"] {
|
||||
border-right: 3px solid palette(highlight);
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab[sideTabBarArea="5"][activeTab="true"] {
|
||||
border-bottom: 3px solid palette(highlight);
|
||||
}
|
||||
/* Side tab styling */
|
||||
|
||||
ads--CDockWidget {
|
||||
background: palette(light);
|
||||
border-color: palette(light);
|
||||
|
@ -22,26 +22,6 @@ ads--CDockWidgetTab {
|
||||
qproperty-iconSize: 16px 16px;/* this is optional in case you would like to change icon size*/
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab {
|
||||
background: palette(window);
|
||||
qproperty-iconSize: 16px 16px;/* this is optional in case you would like to change icon size*/
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab[sideTabBarArea="0"],[sideTabBarArea="1"] {
|
||||
border-left: 3px solid grey;
|
||||
border-bottom: 1px solid white;
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab[sideTabBarArea="2"],[sideTabBarArea="3"] {
|
||||
border-right: 3px solid grey;
|
||||
border-bottom: 1px solid white;
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab[sideTabBarArea="4"] {
|
||||
border-bottom: 3px solid grey;
|
||||
border-right: 1px solid white;
|
||||
}
|
||||
|
||||
ads--CDockWidgetTab[activeTab="true"] {
|
||||
background: qlineargradient(spread : pad, x1 : 0, y1 : 0, x2 : 0, y2 : 0.5, stop : 0
|
||||
palette(window), stop:1 palette(light));
|
||||
@ -56,6 +36,69 @@ ads--CDockWidgetTab[activeTab="true"] QLabel {
|
||||
color: palette(foreground);
|
||||
}
|
||||
|
||||
/* Side tab styling */
|
||||
ads--CDockWidgetSideTab {
|
||||
background: palette(window);
|
||||
qproperty-iconSize: 16px 16px;/* this is optional in case you would like to change icon size*/
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab[sideTabBarArea="0"] {
|
||||
border-top: 3px solid grey;
|
||||
border-right: 1px solid white;
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab[sideTabBarArea="1"],[sideTabBarArea="2"] {
|
||||
border-left: 3px solid grey;
|
||||
border-bottom: 1px solid white;
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab[sideTabBarArea="3"],[sideTabBarArea="4"] {
|
||||
border-right: 3px solid grey;
|
||||
border-bottom: 1px solid white;
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab[sideTabBarArea="5"] {
|
||||
border-bottom: 3px solid grey;
|
||||
border-right: 1px solid white;
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab:hover[sideTabBarArea="0"] {
|
||||
border-top: 3px solid palette(highlight);
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab:hover[sideTabBarArea="1"],:hover[sideTabBarArea="2"] {
|
||||
border-left: 3px solid palette(highlight);
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab:hover[sideTabBarArea="3"],:hover[sideTabBarArea="4"] {
|
||||
border-right: 3px solid palette(highlight);
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab:hover[sideTabBarArea="5"] {
|
||||
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"] {
|
||||
border-top: 3px solid palette(highlight);
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab[sideTabBarArea="1"][activeTab="true"],[sideTabBarArea="2"][activeTab="true"] {
|
||||
border-left: 3px solid palette(highlight);
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab[sideTabBarArea="3"][activeTab="true"],[sideTabBarArea="4"][focused="true"] {
|
||||
border-right: 3px solid palette(highlight);
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab[sideTabBarArea="5"][activeTab="true"] {
|
||||
border-bottom: 3px solid palette(highlight);
|
||||
}
|
||||
/* Side tab styling */
|
||||
|
||||
ads--CDockWidget {
|
||||
background: palette(light);
|
||||
border-color: palette(light);
|
||||
@ -120,31 +163,7 @@ ads--CDockSplitter::handle {
|
||||
}
|
||||
|
||||
/* Focus related styling */
|
||||
ads--CDockWidgetSideTab:hover[sideTabBarArea="0"],:hover[sideTabBarArea="1"] {
|
||||
border-left: 3px solid palette(highlight);
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab:hover[sideTabBarArea="2"],:hover[sideTabBarArea="3"] {
|
||||
border-right: 3px solid palette(highlight);
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab:hover[sideTabBarArea="4"] {
|
||||
border-bottom: 3px solid palette(highlight);
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab[sideTabBarArea="0"][focused="true"],[sideTabBarArea="1"][focused="true"] {
|
||||
border-left: 3px solid palette(highlight);
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab[sideTabBarArea="2"][focused="true"],[sideTabBarArea="3"][focused="true"] {
|
||||
border-right: 3px solid palette(highlight);
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab[sideTabBarArea="4"][focused="true"] {
|
||||
border-bottom: 3px solid palette(highlight);
|
||||
}
|
||||
|
||||
ads--CDockWidgetTab[focused="true"] {
|
||||
ads--CDockWidgetTab[activeTab="true"] {
|
||||
background: palette(highlight);
|
||||
border-color: palette(highlight);
|
||||
}
|
||||
|
@ -44,26 +44,69 @@ ads--CDockWidgetTab[activeTab="true"] QLabel {
|
||||
color: palette(foreground);
|
||||
}
|
||||
|
||||
/* Side tab styling */
|
||||
ads--CDockWidgetSideTab {
|
||||
background: palette(window);
|
||||
qproperty-iconSize: 16px 16px;/* this is optional in case you would like to change icon size*/
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab[sideTabBarArea="0"],[sideTabBarArea="1"] {
|
||||
ads--CDockWidgetSideTab[sideTabBarArea="0"] {
|
||||
border-top: 3px solid grey;
|
||||
border-right: 1px solid white;
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab[sideTabBarArea="1"],[sideTabBarArea="2"] {
|
||||
border-left: 3px solid grey;
|
||||
border-bottom: 1px solid white;
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab[sideTabBarArea="2"],[sideTabBarArea="3"] {
|
||||
ads--CDockWidgetSideTab[sideTabBarArea="3"],[sideTabBarArea="4"] {
|
||||
border-right: 3px solid grey;
|
||||
border-bottom: 1px solid white;
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab[sideTabBarArea="4"] {
|
||||
ads--CDockWidgetSideTab[sideTabBarArea="5"] {
|
||||
border-bottom: 3px solid grey;
|
||||
border-right: 1px solid white;
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab:hover[sideTabBarArea="0"] {
|
||||
border-top: 3px solid palette(highlight);
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab:hover[sideTabBarArea="1"],:hover[sideTabBarArea="2"] {
|
||||
border-left: 3px solid palette(highlight);
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab:hover[sideTabBarArea="3"],:hover[sideTabBarArea="4"] {
|
||||
border-right: 3px solid palette(highlight);
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab:hover[sideTabBarArea="5"] {
|
||||
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"] {
|
||||
border-top: 3px solid palette(highlight);
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab[sideTabBarArea="1"][activeTab="true"],[sideTabBarArea="2"][activeTab="true"] {
|
||||
border-left: 3px solid palette(highlight);
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab[sideTabBarArea="3"][activeTab="true"],[sideTabBarArea="4"][focused="true"] {
|
||||
border-right: 3px solid palette(highlight);
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab[sideTabBarArea="5"][activeTab="true"] {
|
||||
border-bottom: 3px solid palette(highlight);
|
||||
}
|
||||
/* Side tab styling */
|
||||
|
||||
ads--CDockWidget {
|
||||
background: palette(light);
|
||||
border-color: palette(light);
|
||||
@ -124,35 +167,6 @@ QScrollArea#dockWidgetScrollArea {
|
||||
|
||||
|
||||
/* Focus related styling */
|
||||
ads--CDockWidgetSideTab:hover[sideTabBarArea="0"],:hover[sideTabBarArea="1"] {
|
||||
border-left: 3px solid palette(highlight);
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab:hover[sideTabBarArea="2"],:hover[sideTabBarArea="3"] {
|
||||
border-right: 3px solid palette(highlight);
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab:hover[sideTabBarArea="4"] {
|
||||
border-bottom: 3px solid palette(highlight);
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab[sideTabBarArea="0"][focused="true"],[sideTabBarArea="1"][focused="true"] {
|
||||
border-left: 3px solid palette(highlight);
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab[sideTabBarArea="2"][focused="true"],[sideTabBarArea="3"][focused="true"] {
|
||||
border-right: 3px solid palette(highlight);
|
||||
}
|
||||
|
||||
ads--CDockWidgetSideTab[sideTabBarArea="4"][focused="true"] {
|
||||
border-bottom: 3px solid palette(highlight);
|
||||
}
|
||||
|
||||
ads--CDockWidgetTab[focused="true"] {
|
||||
background: palette(highlight);
|
||||
border-color: palette(highlight);
|
||||
}
|
||||
|
||||
ads--CDockWidgetTab[focused="true"]>#tabCloseButton {
|
||||
qproperty-icon: url(:/ads/images/close-button-focused.svg)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user