mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-12-26 08:01:32 +08:00
Added activeTab property
This commit is contained in:
parent
f9b62234b0
commit
b0544be068
@ -459,6 +459,8 @@ void CAutoHideDockContainer::collapseView(bool Enable)
|
|||||||
d->DockManager->setDockWidgetFocused(d->DockWidget);
|
d->DockManager->setDockWidgetFocused(d->DockWidget);
|
||||||
qApp->installEventFilter(this);
|
qApp->installEventFilter(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
d->DockWidget->sideTabWidget()->updateStyle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -322,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
|
CDockWidget* CDockWidgetSideTab::dockWidget() const
|
||||||
{
|
{
|
||||||
|
@ -52,6 +52,7 @@ class ADS_EXPORT CDockWidgetSideTab : public QFrame
|
|||||||
|
|
||||||
Q_PROPERTY(SideTabBarArea sideTabBarArea READ sideTabBarArea)
|
Q_PROPERTY(SideTabBarArea sideTabBarArea READ sideTabBarArea)
|
||||||
Q_PROPERTY(QSize iconSize READ iconSize WRITE setIconSize)
|
Q_PROPERTY(QSize iconSize READ iconSize WRITE setIconSize)
|
||||||
|
Q_PROPERTY(bool activeTab READ isActiveTab)
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DockWidgetSideTabPrivate* d; ///< private data (pimpl)
|
DockWidgetSideTabPrivate* d; ///< private data (pimpl)
|
||||||
@ -139,6 +140,10 @@ public:
|
|||||||
*/
|
*/
|
||||||
void updateOrientationAndSpacing(SideTabBarArea area);
|
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
|
* returns the dock widget this belongs to
|
||||||
|
@ -41,6 +41,63 @@ ads--CDockWidgetTab[activeTab="true"] QLabel {
|
|||||||
|
|
||||||
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*/
|
||||||
|
}
|
||||||
|
|
||||||
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
ads--CDockWidget {
|
ads--CDockWidget {
|
||||||
|
@ -141,27 +141,27 @@ ads--CDockWidgetSideTab:hover[sideTabBarArea="5"] {
|
|||||||
border-bottom: 3px solid palette(highlight);
|
border-bottom: 3px solid palette(highlight);
|
||||||
}
|
}
|
||||||
|
|
||||||
ads--CDockWidgetSideTab:hover[sideTabBarArea="0"][focused="true"] {
|
ads--CDockWidgetSideTab:hover[sideTabBarArea="0"][activeTab="true"] {
|
||||||
border-top: 3px solid palette(highlight);
|
border-top: 3px solid palette(highlight);
|
||||||
}
|
}
|
||||||
|
|
||||||
ads--CDockWidgetSideTab[sideTabBarArea="0"][focused="true"] {
|
ads--CDockWidgetSideTab[sideTabBarArea="0"][activeTab="true"] {
|
||||||
border-top: 3px solid palette(highlight);
|
border-top: 3px solid palette(highlight);
|
||||||
}
|
}
|
||||||
|
|
||||||
ads--CDockWidgetSideTab[sideTabBarArea="1"][focused="true"],[sideTabBarArea="2"][focused="true"] {
|
ads--CDockWidgetSideTab[sideTabBarArea="1"][activeTab="true"],[sideTabBarArea="2"][activeTab="true"] {
|
||||||
border-left: 3px solid palette(highlight);
|
border-left: 3px solid palette(highlight);
|
||||||
}
|
}
|
||||||
|
|
||||||
ads--CDockWidgetSideTab[sideTabBarArea="3"][focused="true"],[sideTabBarArea="4"][focused="true"] {
|
ads--CDockWidgetSideTab[sideTabBarArea="3"][activeTab="true"],[sideTabBarArea="4"][focused="true"] {
|
||||||
border-right: 3px solid palette(highlight);
|
border-right: 3px solid palette(highlight);
|
||||||
}
|
}
|
||||||
|
|
||||||
ads--CDockWidgetSideTab[sideTabBarArea="5"][focused="true"] {
|
ads--CDockWidgetSideTab[sideTabBarArea="5"][activeTab="true"] {
|
||||||
border-bottom: 3px solid palette(highlight);
|
border-bottom: 3px solid palette(highlight);
|
||||||
}
|
}
|
||||||
|
|
||||||
ads--CDockWidgetTab[focused="true"] {
|
ads--CDockWidgetTab[activeTab="true"] {
|
||||||
background: palette(highlight);
|
background: palette(highlight);
|
||||||
border-color: palette(highlight);
|
border-color: palette(highlight);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user