Fixed build issues and improved styling

Improved styling of close buttons and focused close buttons
This commit is contained in:
Uwe Kindler 2020-06-07 17:28:23 +02:00
parent 0227bd1786
commit a9268e6bf7
3 changed files with 35 additions and 4 deletions

View File

@ -24,6 +24,10 @@
#include "DockManager.h"
#include "DockAreaTitleBar.h"
#ifdef Q_OS_LINUX
#include "linux/FloatingWidgetTitleBar.h"
#endif
namespace ads
{
/**
@ -34,6 +38,9 @@ struct DockFocusControllerPrivate
CDockFocusController *_this;
QPointer<CDockWidget> FocusedDockWidget = nullptr;
QPointer<CDockAreaWidget> FocusedArea = nullptr;
#ifdef Q_OS_LINUX
QPointer<CFloatingDockContainer> FloatingWidget = nullptr;
#endif
CDockManager* DockManager;
/**

View File

@ -810,7 +810,7 @@ void CFloatingDockContainer::showEvent(QShowEvent *event)
{
Super::showEvent(event);
#ifdef Q_OS_LINUX
if (CDockManager::testConfigFlag(CDockManager::FocusStyling))
if (CDockManager::testConfigFlag(CDockManager::FocusHighlighting))
{
this->window()->activateWindow();
}

View File

@ -84,13 +84,19 @@ QScrollArea#dockWidgetScrollArea
#tabCloseButton:hover
{
border: 1px solid rgba(0, 0, 0, 32);
background: rgba(0, 0, 0, 16);
/*border: 1px solid rgba(0, 0, 0, 32);*/
background: rgba(0, 0, 0, 24);
}
#tabCloseButton:pressed
{
background: rgba(0, 0, 0, 32);
background: rgba(0, 0, 0, 48);
}
#tabCloseButton
{
qproperty-icon: url(:/ads/images/close-button.svg);
qproperty-iconSize: 16px;
}
/* Focus related styling */
@ -100,6 +106,24 @@ ads--CDockWidgetTab[focused="true"]
border-color: palette(highlight);
}
ads--CDockWidgetTab[focused="true"] > #tabCloseButton
{
qproperty-icon: url(:/ads/images/close-button-focused.svg)
}
ads--CDockWidgetTab[focused="true"] > #tabCloseButton:hover
{
background: rgba(255, 255, 255, 48);
}
ads--CDockWidgetTab[focused="true"] > #tabCloseButton:pressed
{
background: rgba(255, 255, 255, 92);
}
ads--CDockWidgetTab[focused="true"] QLabel
{
color: palette(light);