forked from qt-creator/qt-creator
Themes: Enable using the original Window color for toolbars
This patch adds a flag which enables the "fancy" side/tool/status bars to use the original Window color from the application palette. The flag is disabled for all themes by default. Task-number: QTCREATORBUG-16331 Change-Id: I1433e865e1903012d521a2cdb7083f110086e455 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
This commit is contained in:
@@ -216,6 +216,7 @@ FlatSideBarIcons=true
|
||||
FlatProjectsMode=true
|
||||
FlatMenuBar=true
|
||||
ToolBarIconShadow=true
|
||||
WindowColorAsBase=false
|
||||
|
||||
[Gradients]
|
||||
DetailsWidgetHeaderGradient\1\color=0
|
||||
|
||||
@@ -187,6 +187,7 @@ FlatSideBarIcons=false
|
||||
FlatProjectsMode=false
|
||||
FlatMenuBar=false
|
||||
ToolBarIconShadow=true
|
||||
WindowColorAsBase=false
|
||||
|
||||
[Gradients]
|
||||
DetailsWidgetHeaderGradient\1\color=ffffff
|
||||
|
||||
@@ -221,6 +221,7 @@ FlatSideBarIcons=true
|
||||
FlatProjectsMode=true
|
||||
FlatMenuBar=true
|
||||
ToolBarIconShadow=true
|
||||
WindowColorAsBase=false
|
||||
|
||||
[Gradients]
|
||||
DetailsWidgetHeaderGradient\1\color=0
|
||||
|
||||
@@ -198,6 +198,7 @@ FlatSideBarIcons=true
|
||||
FlatProjectsMode=false
|
||||
FlatMenuBar=false
|
||||
ToolBarIconShadow=false
|
||||
WindowColorAsBase=false
|
||||
|
||||
[Gradients]
|
||||
DetailsWidgetHeaderGradient\1\color=0
|
||||
|
||||
@@ -197,6 +197,7 @@ FlatSideBarIcons=true
|
||||
FlatProjectsMode=false
|
||||
FlatMenuBar=false
|
||||
ToolBarIconShadow=true
|
||||
WindowColorAsBase=false
|
||||
|
||||
[Gradients]
|
||||
DetailsWidgetHeaderGradient\1\color=0
|
||||
|
||||
@@ -114,6 +114,12 @@ QColor StyleHelper::m_requestedBaseColor;
|
||||
|
||||
QColor StyleHelper::baseColor(bool lightColored)
|
||||
{
|
||||
static const bool windowColorAsBase = creatorTheme()->flag(Theme::WindowColorAsBase);
|
||||
if (windowColorAsBase) {
|
||||
static const QColor windowColor = QApplication::palette().color(QPalette::Window);
|
||||
return windowColor;
|
||||
}
|
||||
|
||||
if (!lightColored)
|
||||
return m_baseColor;
|
||||
else
|
||||
|
||||
@@ -326,7 +326,8 @@ public:
|
||||
FlatSideBarIcons,
|
||||
FlatProjectsMode,
|
||||
FlatMenuBar,
|
||||
ToolBarIconShadow
|
||||
ToolBarIconShadow,
|
||||
WindowColorAsBase
|
||||
};
|
||||
|
||||
bool flag(Flag f) const;
|
||||
|
||||
Reference in New Issue
Block a user