utils: Fix StyleHelper::baseColor with lightColored

Change-Id: I3b06664585c0a608962f2d627859fd388bcb0372
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Alessandro Portale
2018-01-07 21:38:17 +01:00
parent 4ab5dbeb3a
commit 4c0e86ecc1

View File

@@ -114,16 +114,10 @@ QColor StyleHelper::m_requestedBaseColor;
QColor StyleHelper::baseColor(bool lightColored)
{
static const QColor windowColor = QApplication::palette().color(QPalette::Window);
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
return m_baseColor.lighter(230);
return (lightColored || windowColorAsBase) ? windowColor : m_baseColor;
}
QColor StyleHelper::highlightColor(bool lightColored)