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

@@ -708,7 +708,7 @@ ToggleButton::ToggleButton(QWidget *parent)
: QToolButton(parent)
{
setToolButtonStyle(Qt::ToolButtonIconOnly);
if (creatorTheme()->widgetStyle() == Theme::StyleFlat) {
if (creatorTheme()->flag(Theme::FlatToolBars)) {
QPalette p = palette();
p.setBrush(QPalette::Base, creatorTheme()->color(Theme::ToggleButtonBackgroundColor));
setPalette(p);