forked from qt-creator/qt-creator
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:
committed by
Alessandro Portale
parent
eeadfbba8c
commit
8588cf268f
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user