forked from qt-creator/qt-creator
Themes: Enable UI recoloring for flat themes
Change-Id: I1907c42a769124b7505bd7afaf6c4da910f3f407 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user