Skip to content

Commit a9268e6

Browse files
Fixed build issues and improved styling
Improved styling of close buttons and focused close buttons
1 parent 0227bd1 commit a9268e6

File tree

3 files changed

+35
-4
lines changed

3 files changed

+35
-4
lines changed

src/DockFocusController.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
#include "DockManager.h"
2525
#include "DockAreaTitleBar.h"
2626

27+
#ifdef Q_OS_LINUX
28+
#include "linux/FloatingWidgetTitleBar.h"
29+
#endif
30+
2731
namespace ads
2832
{
2933
/**
@@ -34,6 +38,9 @@ struct DockFocusControllerPrivate
3438
CDockFocusController *_this;
3539
QPointer<CDockWidget> FocusedDockWidget = nullptr;
3640
QPointer<CDockAreaWidget> FocusedArea = nullptr;
41+
#ifdef Q_OS_LINUX
42+
QPointer<CFloatingDockContainer> FloatingWidget = nullptr;
43+
#endif
3744
CDockManager* DockManager;
3845

3946
/**

src/FloatingDockContainer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,7 @@ void CFloatingDockContainer::showEvent(QShowEvent *event)
810810
{
811811
Super::showEvent(event);
812812
#ifdef Q_OS_LINUX
813-
if (CDockManager::testConfigFlag(CDockManager::FocusStyling))
813+
if (CDockManager::testConfigFlag(CDockManager::FocusHighlighting))
814814
{
815815
this->window()->activateWindow();
816816
}

src/stylesheets/default_linux.css

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,19 @@ QScrollArea#dockWidgetScrollArea
8484

8585
#tabCloseButton:hover
8686
{
87-
border: 1px solid rgba(0, 0, 0, 32);
88-
background: rgba(0, 0, 0, 16);
87+
/*border: 1px solid rgba(0, 0, 0, 32);*/
88+
background: rgba(0, 0, 0, 24);
8989
}
9090

9191
#tabCloseButton:pressed
9292
{
93-
background: rgba(0, 0, 0, 32);
93+
background: rgba(0, 0, 0, 48);
94+
}
95+
96+
#tabCloseButton
97+
{
98+
qproperty-icon: url(:/ads/images/close-button.svg);
99+
qproperty-iconSize: 16px;
94100
}
95101

96102
/* Focus related styling */
@@ -100,6 +106,24 @@ ads--CDockWidgetTab[focused="true"]
100106
border-color: palette(highlight);
101107
}
102108

109+
ads--CDockWidgetTab[focused="true"] > #tabCloseButton
110+
{
111+
qproperty-icon: url(:/ads/images/close-button-focused.svg)
112+
}
113+
114+
115+
116+
ads--CDockWidgetTab[focused="true"] > #tabCloseButton:hover
117+
{
118+
background: rgba(255, 255, 255, 48);
119+
}
120+
121+
122+
ads--CDockWidgetTab[focused="true"] > #tabCloseButton:pressed
123+
{
124+
background: rgba(255, 255, 255, 92);
125+
}
126+
103127
ads--CDockWidgetTab[focused="true"] QLabel
104128
{
105129
color: palette(light);

0 commit comments

Comments
 (0)