forked from qt-creator/qt-creator
utils: Fix StyleHelper::baseColor with lightColored
Change-Id: I3b06664585c0a608962f2d627859fd388bcb0372 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -114,16 +114,10 @@ QColor StyleHelper::m_requestedBaseColor;
|
|||||||
|
|
||||||
QColor StyleHelper::baseColor(bool lightColored)
|
QColor StyleHelper::baseColor(bool lightColored)
|
||||||
{
|
{
|
||||||
|
static const QColor windowColor = QApplication::palette().color(QPalette::Window);
|
||||||
static const bool windowColorAsBase = creatorTheme()->flag(Theme::WindowColorAsBase);
|
static const bool windowColorAsBase = creatorTheme()->flag(Theme::WindowColorAsBase);
|
||||||
if (windowColorAsBase) {
|
|
||||||
static const QColor windowColor = QApplication::palette().color(QPalette::Window);
|
|
||||||
return windowColor;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!lightColored)
|
return (lightColored || windowColorAsBase) ? windowColor : m_baseColor;
|
||||||
return m_baseColor;
|
|
||||||
else
|
|
||||||
return m_baseColor.lighter(230);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QColor StyleHelper::highlightColor(bool lightColored)
|
QColor StyleHelper::highlightColor(bool lightColored)
|
||||||
|
|||||||
Reference in New Issue
Block a user