diff options
author | Alessandro Portale <alessandro.portale@theqtcompany.com> | 2016-02-16 21:06:44 +0100 |
---|---|---|
committer | Alessandro Portale <alessandro.portale@theqtcompany.com> | 2016-02-18 11:37:28 +0000 |
commit | 02af5d80b603322fe3539e8e6629ae5d719c9dbb (patch) | |
tree | 93af371d76d1337651059fc6eb08b094713c8743 /src/plugins/coreplugin/manhattanstyle.cpp | |
parent | fbffd3abaef1afcee296992e8f56a21902715036 (diff) | |
download | qt-creator-02af5d80b603322fe3539e8e6629ae5d719c9dbb.tar.gz |
Themes: Enable UI recoloring for flat themes
Change-Id: I1907c42a769124b7505bd7afaf6c4da910f3f407
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Diffstat (limited to 'src/plugins/coreplugin/manhattanstyle.cpp')
-rw-r--r-- | src/plugins/coreplugin/manhattanstyle.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/plugins/coreplugin/manhattanstyle.cpp b/src/plugins/coreplugin/manhattanstyle.cpp index aaf842247f..83d821985a 100644 --- a/src/plugins/coreplugin/manhattanstyle.cpp +++ b/src/plugins/coreplugin/manhattanstyle.cpp @@ -664,7 +664,9 @@ void ManhattanStyle::drawControl(ControlElement element, const QStyleOption *opt const bool dis = !(mbi->state & State_Enabled); if (creatorTheme()->widgetStyle() == Theme::StyleFlat) - painter->fillRect(option->rect, creatorTheme()->color(Theme::MenuBarItemBackgroundColor)); + painter->fillRect(option->rect, StyleHelper::isBaseColorDefault() + ? creatorTheme()->color(Theme::MenuBarItemBackgroundColor) + : StyleHelper::baseColor()); else StyleHelper::menuGradient(painter, option->rect, option->rect); @@ -802,7 +804,9 @@ void ManhattanStyle::drawControl(ControlElement element, const QStyleOption *opt option->rect.bottomRight() + QPointF(0.5, 0.5)); painter->restore(); } else { - painter->fillRect(option->rect, creatorTheme()->color(Theme::MenuBarEmptyAreaBackgroundColor)); + painter->fillRect(option->rect, StyleHelper::isBaseColorDefault() + ? creatorTheme()->color(Theme::MenuBarEmptyAreaBackgroundColor) + : StyleHelper::baseColor()); } } break; @@ -824,7 +828,9 @@ void ManhattanStyle::drawControl(ControlElement element, const QStyleOption *opt bool drawLightColored = lightColored(widget); // draws the background of the 'Type hierarchy', 'Projects' headers if (creatorTheme()->widgetStyle() == Theme::StyleFlat) - painter->fillRect (rect, creatorTheme()->color(Theme::ToolBarBackgroundColor)); + painter->fillRect(rect, StyleHelper::isBaseColorDefault() + ? creatorTheme()->color(Theme::ToolBarBackgroundColor) + : StyleHelper::baseColor(drawLightColored)); else if (horizontal) StyleHelper::horizontalGradient(painter, gradientSpan, rect, drawLightColored); else |