diff options
author | Alessandro Portale <alessandro.portale@qt.io> | 2018-01-07 21:38:17 +0100 |
---|---|---|
committer | Alessandro Portale <alessandro.portale@qt.io> | 2018-02-14 15:09:29 +0000 |
commit | 4c0e86ecc15362ec9e5ad2fd644aefb8193d4a30 (patch) | |
tree | f84f39ac605fdcfe48b3e1dd108e7a30581cd9c8 /src/libs/utils/stylehelper.cpp | |
parent | 4ab5dbeb3a3c3a13a8b0f24a17fac4d9c41daed0 (diff) |
utils: Fix StyleHelper::baseColor with lightColored
Change-Id: I3b06664585c0a608962f2d627859fd388bcb0372
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/libs/utils/stylehelper.cpp')
-rw-r--r-- | src/libs/utils/stylehelper.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/libs/utils/stylehelper.cpp b/src/libs/utils/stylehelper.cpp index b70ea7b07c4..468bccc3484 100644 --- a/src/libs/utils/stylehelper.cpp +++ b/src/libs/utils/stylehelper.cpp @@ -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) |