Utils: Replace Theme::widgetStyle with a flag

Theme::widgetStyle with its two possible return values makes less sense
than a bool flag. Especially since we already have several separate
theme flags for ui elements which might be "flat" or not.

Change-Id: Ic521bb58c04386b735b784079de05e521bc1f45f
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Alessandro Portale
2016-06-15 17:41:33 +02:00
committed by Alessandro Portale
parent eeadfbba8c
commit 8588cf268f
17 changed files with 56 additions and 85 deletions

View File

@@ -135,7 +135,7 @@ void TargetSelectorDelegate::paint(QPainter *painter,
const QColor color = (option.state & QStyle::State_HasFocus) ?
option.palette.highlight().color() :
option.palette.dark().color();
if (creatorTheme()->widgetStyle() == Theme::StyleFlat) {
if (creatorTheme()->flag(Theme::FlatToolBars)) {
painter->fillRect(option.rect, color);
} else {
painter->fillRect(option.rect, color.darker(140));