diff --git a/share/qtcreator/themes/dark.creatortheme b/share/qtcreator/themes/dark.creatortheme index e538150cd1a..cfb41b608bb 100644 --- a/share/qtcreator/themes/dark.creatortheme +++ b/share/qtcreator/themes/dark.creatortheme @@ -185,6 +185,7 @@ DrawSearchResultWidgetFrame=false DrawTargetSelectorBottom=false DrawToolBarHighlights=true ApplyThemePaletteGlobally=true +FlatToolBars=true FlatSideBarIcons=true FlatProjectsMode=true FlatMenuBar=true @@ -208,6 +209,3 @@ BuildStepDisable=:/projectexplorer/images/lightdisabledbuildstep.png BuildStepRemove=:/core/images/lightclose.png BuildStepMoveDown=:/core/images/lightarrowdown.png BuildStepMoveUp=:/core/images/lightarrowup.png - -[Style] -WidgetStyle=StyleFlat diff --git a/share/qtcreator/themes/default.creatortheme b/share/qtcreator/themes/default.creatortheme index 441326bb614..ede12f035de 100644 --- a/share/qtcreator/themes/default.creatortheme +++ b/share/qtcreator/themes/default.creatortheme @@ -179,6 +179,7 @@ DrawSearchResultWidgetFrame=true DrawTargetSelectorBottom=true DrawToolBarHighlights=true ApplyThemePaletteGlobally=false +FlatToolBars=false FlatSideBarIcons=false FlatProjectsMode=false FlatMenuBar=false @@ -188,6 +189,3 @@ ToolBarIconShadow=true DetailsWidgetHeaderGradient\1\color=ffffff DetailsWidgetHeaderGradient\1\pos=1 DetailsWidgetHeaderGradient\size=1 - -[Style] -WidgetStyle=StyleDefault diff --git a/share/qtcreator/themes/flat.creatortheme b/share/qtcreator/themes/flat.creatortheme index 0ba0b6fc18e..b9bf2c898ad 100644 --- a/share/qtcreator/themes/flat.creatortheme +++ b/share/qtcreator/themes/flat.creatortheme @@ -189,6 +189,7 @@ DrawSearchResultWidgetFrame=false DrawTargetSelectorBottom=false DrawToolBarHighlights=false ApplyThemePaletteGlobally=false +FlatToolBars=true FlatSideBarIcons=true FlatProjectsMode=false FlatMenuBar=false @@ -198,6 +199,3 @@ ToolBarIconShadow=true DetailsWidgetHeaderGradient\1\color=0 DetailsWidgetHeaderGradient\1\pos=1 DetailsWidgetHeaderGradient\size=1 - -[Style] -WidgetStyle=StyleFlat diff --git a/src/libs/utils/theme/theme.cpp b/src/libs/utils/theme/theme.cpp index a180acf3acd..cf730739c37 100644 --- a/src/libs/utils/theme/theme.cpp +++ b/src/libs/utils/theme/theme.cpp @@ -39,7 +39,6 @@ namespace Utils { static Theme *m_creatorTheme = 0; ThemePrivate::ThemePrivate() - : widgetStyle(Theme::StyleDefault) { const QMetaObject &m = Theme::staticMetaObject; colors.resize (m.enumerator(m.indexOfEnumerator("Color")).keyCount()); @@ -73,11 +72,6 @@ Theme::~Theme() delete d; } -Theme::WidgetStyle Theme::widgetStyle() const -{ - return d->widgetStyle; -} - QStringList Theme::preferredStyles() const { return d->preferredStyles; @@ -164,10 +158,6 @@ QVariantHash Theme::values() const result.insert(key, flag(static_cast(i))); } } - { - const QMetaEnum e = m.enumerator(m.indexOfEnumerator("WidgetStyle")); - result.insert(QLatin1String("WidgetStyle"), QLatin1String(e.valueToKey(widgetStyle()))); - } return result; } @@ -198,13 +188,6 @@ void Theme::readSettings(QSettings &settings) } settings.endGroup(); } - { - settings.beginGroup(QLatin1String("Style")); - QMetaEnum e = m.enumerator(m.indexOfEnumerator("WidgetStyle")); - QString val = settings.value(QLatin1String("WidgetStyle")).toString(); - d->widgetStyle = static_cast(e.keysToValue (val.toLatin1().data())); - settings.endGroup(); - } { settings.beginGroup(QLatin1String("Colors")); QMetaEnum e = m.enumerator(m.indexOfEnumerator("Color")); diff --git a/src/libs/utils/theme/theme.h b/src/libs/utils/theme/theme.h index b7e3ea6a444..e4a53620489 100644 --- a/src/libs/utils/theme/theme.h +++ b/src/libs/utils/theme/theme.h @@ -272,18 +272,13 @@ public: ComboBoxDrawTextShadow, DerivePaletteFromTheme, ApplyThemePaletteGlobally, + FlatToolBars, FlatSideBarIcons, FlatProjectsMode, FlatMenuBar, ToolBarIconShadow }; - enum WidgetStyle { - StyleDefault, - StyleFlat - }; - - WidgetStyle widgetStyle() const; bool flag(Flag f) const; QColor color(Color role) const; QString imageFile(ImageFile imageFile, const QString &fallBack) const; diff --git a/src/libs/utils/theme/theme_p.h b/src/libs/utils/theme/theme_p.h index 8dafe9db57e..4170ec7cd9f 100644 --- a/src/libs/utils/theme/theme_p.h +++ b/src/libs/utils/theme/theme_p.h @@ -47,7 +47,6 @@ public: QVector imageFiles; QVector gradients; QVector flags; - Theme::WidgetStyle widgetStyle; QMap palette; }; diff --git a/src/plugins/coreplugin/editormanager/editorview.cpp b/src/plugins/coreplugin/editormanager/editorview.cpp index 2129740d19d..059bf7cd1ff 100644 --- a/src/plugins/coreplugin/editormanager/editorview.cpp +++ b/src/plugins/coreplugin/editormanager/editorview.cpp @@ -291,14 +291,14 @@ void EditorView::paintEvent(QPaintEvent *) QPainter painter(this); QRect rect = m_container->geometry(); - if (creatorTheme()->widgetStyle() == Theme::StyleDefault) { + if (creatorTheme()->flag(Theme::FlatToolBars)) { + painter.fillRect(rect, creatorTheme()->color(Theme::EditorPlaceholderColor)); + } else { painter.setRenderHint(QPainter::Antialiasing, true); painter.setPen(Qt::NoPen); painter.setBrush(creatorTheme()->color(Theme::EditorPlaceholderColor)); const int r = 3; painter.drawRoundedRect(rect.adjusted(r , r, -r, -r), r * 2, r * 2); - } else { - painter.fillRect(rect, creatorTheme()->color(Theme::EditorPlaceholderColor)); } } diff --git a/src/plugins/coreplugin/fancyactionbar.cpp b/src/plugins/coreplugin/fancyactionbar.cpp index b527431d00e..14d3868f9cf 100644 --- a/src/plugins/coreplugin/fancyactionbar.cpp +++ b/src/plugins/coreplugin/fancyactionbar.cpp @@ -145,20 +145,22 @@ void FancyToolButton::paintEvent(QPaintEvent *event) if (!HostOsInfo::isMacHost() // Mac UIs usually don't hover && m_fader > 0 && isEnabled() && !isDown() && !isChecked()) { painter.save(); - if (creatorTheme()->widgetStyle() == Theme::StyleDefault) { - painter.setOpacity(m_fader); - FancyToolButton::hoverOverlay(&painter, rect()); - } else { + if (creatorTheme()->flag(Theme::FlatToolBars)) { const QColor hoverColor = creatorTheme()->color(Theme::FancyToolButtonHoverColor); QColor fadedHoverColor = hoverColor; fadedHoverColor.setAlpha(int(m_fader * hoverColor.alpha())); painter.fillRect(rect(), fadedHoverColor); + } else { + painter.setOpacity(m_fader); + FancyToolButton::hoverOverlay(&painter, rect()); } painter.restore(); } else if (isDown() || isChecked()) { painter.save(); const QColor selectedColor = creatorTheme()->color(Theme::FancyToolButtonSelectedColor); - if (creatorTheme()->widgetStyle() == Theme::StyleDefault) { + if (creatorTheme()->flag(Theme::FlatToolBars)) { + painter.fillRect(rect(), selectedColor); + } else { QLinearGradient grad(rect().topLeft(), rect().topRight()); grad.setColorAt(0, Qt::transparent); grad.setColorAt(0.5, selectedColor); @@ -171,8 +173,6 @@ void FancyToolButton::paintEvent(QPaintEvent *event) painter.drawLine(borderRectF.topLeft() + QPointF(0, 1), borderRectF.topRight() + QPointF(0, 1)); painter.drawLine(borderRectF.bottomLeft(), borderRectF.bottomRight()); painter.drawLine(borderRectF.bottomLeft(), borderRectF.bottomRight()); - } else { - painter.fillRect(rect(), selectedColor); } painter.restore(); } @@ -269,7 +269,7 @@ void FancyActionBar::paintEvent(QPaintEvent *event) { QPainter painter(this); const QRectF borderRect = QRectF(rect()).adjusted(0.5, 0.5, -0.5, -0.5); - if (creatorTheme()->widgetStyle () == Theme::StyleFlat) { + if (creatorTheme()->flag(Theme::FlatToolBars)) { // this paints the background of the bottom portion of the // left tab bar painter.fillRect(event->rect(), StyleHelper::baseColor()); diff --git a/src/plugins/coreplugin/fancytabwidget.cpp b/src/plugins/coreplugin/fancytabwidget.cpp index 925efb4b285..3c8d4219c82 100644 --- a/src/plugins/coreplugin/fancytabwidget.cpp +++ b/src/plugins/coreplugin/fancytabwidget.cpp @@ -114,7 +114,7 @@ QSize FancyTabBar::tabSizeHint(bool minimum) const void FancyTabBar::paintEvent(QPaintEvent *event) { QPainter p(this); - if (creatorTheme()->widgetStyle() == Theme::StyleFlat) { + if (creatorTheme()->flag(Theme::FlatToolBars)) { // draw background of upper part of left tab widget // (Welcome, ... Help) p.fillRect(event->rect(), StyleHelper::baseColor()); @@ -293,7 +293,7 @@ void FancyTabBar::paintTab(QPainter *painter, int tabIndex) const bool enabled = isTabEnabled(tabIndex); if (selected) { - if (creatorTheme()->widgetStyle() == Theme::StyleFlat) { + if (creatorTheme()->flag(Theme::FlatToolBars)) { // background color of a fancy tab that is active painter->fillRect(rect, creatorTheme()->color(Theme::FancyToolButtonSelectedColor)); } else { @@ -317,14 +317,14 @@ void FancyTabBar::paintTab(QPainter *painter, int tabIndex) const if (fader > 0 && !HostOsInfo::isMacHost() && !selected && enabled) { painter->save(); painter->setOpacity(fader); - if (creatorTheme()->widgetStyle() == Theme::StyleFlat) + if (creatorTheme()->flag(Theme::FlatToolBars)) painter->fillRect(rect, creatorTheme()->color(Theme::FancyToolButtonHoverColor)); else FancyToolButton::hoverOverlay(painter, rect); painter->restore(); } - if (!enabled && creatorTheme()->widgetStyle() == Theme::StyleDefault) + if (!enabled && !creatorTheme()->flag(Theme::FlatToolBars)) painter->setOpacity(0.7); if (drawIcon) { diff --git a/src/plugins/coreplugin/manhattanstyle.cpp b/src/plugins/coreplugin/manhattanstyle.cpp index c90ef20eab3..95ee18266bb 100644 --- a/src/plugins/coreplugin/manhattanstyle.cpp +++ b/src/plugins/coreplugin/manhattanstyle.cpp @@ -455,7 +455,13 @@ void ManhattanStyle::drawPrimitive(PrimitiveElement element, const QStyleOption // Fill the line edit background QRectF backgroundRect = option->rect; const bool enabled = option->state & State_Enabled; - if (Utils::creatorTheme()->widgetStyle() == Utils::Theme::StyleDefault) { + if (Utils::creatorTheme()->flag(Theme::FlatToolBars)) { + painter->save(); + if (!enabled) + painter->setOpacity(0.75); + painter->fillRect(backgroundRect, option->palette.base()); + painter->restore(); + } else { backgroundRect.adjust(1, 1, -1, -1); painter->setBrushOrigin(backgroundRect.topLeft()); painter->fillRect(backgroundRect, option->palette.base()); @@ -467,12 +473,6 @@ void ManhattanStyle::drawPrimitive(PrimitiveElement element, const QStyleOption StyleHelper::drawCornerImage(enabled ? bg : bg_disabled, painter, option->rect, 5, 5, 5, 5); - } else { - painter->save(); - if (!enabled) - painter->setOpacity(0.75); - painter->fillRect(backgroundRect, option->palette.base()); - painter->restore(); } const bool hasFocus = state & State_HasFocus; @@ -499,7 +499,7 @@ void ManhattanStyle::drawPrimitive(PrimitiveElement element, const QStyleOption if (pressed) { const QColor shade = creatorTheme()->color(Theme::FancyToolButtonSelectedColor); painter->fillRect(rect, shade); - if (creatorTheme()->widgetStyle() == Theme::StyleDefault) { + if (!creatorTheme()->flag(Theme::FlatToolBars)) { const QRectF borderRect = QRectF(rect).adjusted(0.5, 0.5, -0.5, -0.5); painter->drawLine(borderRect.topLeft() + QPointF(1, 0), borderRect.topRight() - QPointF(1, 0)); painter->drawLine(borderRect.topLeft(), borderRect.bottomLeft()); @@ -527,7 +527,9 @@ void ManhattanStyle::drawPrimitive(PrimitiveElement element, const QStyleOption case PE_PanelStatusBar: { - if (creatorTheme()->widgetStyle() == Theme::StyleDefault) { + if (creatorTheme()->flag(Theme::FlatToolBars)) { + painter->fillRect(rect, StyleHelper::baseColor()); + } else { painter->save(); QLinearGradient grad = StyleHelper::statusBarGradient(rect); painter->fillRect(rect, grad); @@ -538,8 +540,6 @@ void ManhattanStyle::drawPrimitive(PrimitiveElement element, const QStyleOption painter->setPen(StyleHelper::borderColor().darker(110)); //TODO: make themable painter->drawLine(borderRect.topLeft(), borderRect.topRight()); painter->restore(); - } else { - painter->fillRect(rect, StyleHelper::baseColor()); } } break; @@ -819,7 +819,7 @@ 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) + if (creatorTheme()->flag(Theme::FlatToolBars)) painter->fillRect(rect, StyleHelper::baseColor(drawLightColored)); else if (horizontal) StyleHelper::horizontalGradient(painter, gradientSpan, rect, drawLightColored); @@ -836,9 +836,9 @@ void ManhattanStyle::drawControl(ControlElement element, const QStyleOption *opt // Note: This is a hack to determine if the // toolbar should draw the top or bottom outline // (needed for the find toolbar for instance) - const QColor hightLight = creatorTheme()->widgetStyle() == Theme::StyleDefault - ? StyleHelper::sidebarHighlight() - : creatorTheme()->color(Theme::FancyToolBarSeparatorColor); + const QColor hightLight = creatorTheme()->flag(Theme::FlatToolBars) + ? creatorTheme()->color(Theme::FancyToolBarSeparatorColor) + : StyleHelper::sidebarHighlight(); const QColor borderColor = drawLightColored ? QColor(255, 255, 255, 180) : hightLight; if (widget && widget->property("topBorder").toBool()) { @@ -1017,7 +1017,7 @@ void ManhattanStyle::drawComplexControl(ComplexControl control, const QStyleOpti void ManhattanStyle::drawButtonSeparator(QPainter *painter, const QRect &rect, bool reverse) const { const QRectF borderRect = QRectF(rect).adjusted(0.5, 0.5, -0.5, -0.5); - if (creatorTheme()->widgetStyle() == Theme::StyleFlat) { + if (creatorTheme()->flag(Theme::FlatToolBars)) { const int margin = 3; painter->setPen(creatorTheme()->color(Theme::FancyToolBarSeparatorColor)); painter->drawLine(borderRect.topRight() + QPointF(0, margin), diff --git a/src/plugins/coreplugin/outputpanemanager.cpp b/src/plugins/coreplugin/outputpanemanager.cpp index 07e234fbf9d..25ae1277108 100644 --- a/src/plugins/coreplugin/outputpanemanager.cpp +++ b/src/plugins/coreplugin/outputpanemanager.cpp @@ -76,7 +76,7 @@ static const int buttonBorderWidth = 3; static int numberAreaWidth() { - return creatorTheme()->widgetStyle() == Theme::StyleDefault ? 19 : 15; + return creatorTheme()->flag(Theme::FlatToolBars) ? 15 : 19; } //// @@ -192,7 +192,7 @@ OutputPaneManager::OutputPaneManager(QWidget *parent) : m_buttonsWidget->setLayout(new QHBoxLayout); m_buttonsWidget->layout()->setContentsMargins(5,0,0,0); m_buttonsWidget->layout()->setSpacing( - creatorTheme()->widgetStyle() == Theme::StyleDefault ? 4 : 9); + creatorTheme()->flag(Theme::FlatToolBars) ? 9 : 4); } OutputPaneManager::~OutputPaneManager() @@ -687,16 +687,7 @@ void OutputPaneToggleButton::paintEvent(QPaintEvent*) const bool hovered = !HostOsInfo::isMacHost() && (styleOption.state & QStyle::State_MouseOver); const QImage *image = 0; - if (creatorTheme()->widgetStyle() == Theme::StyleDefault) { - if (isDown()) - image = &panelButtonPressed; - else if (isChecked()) - image = hovered ? &panelButtonCheckedHover : &panelButtonChecked; - else - image = hovered ? &panelButtonHover : &panelButton; - if (image) - StyleHelper::drawCornerImage(*image, &p, rect(), numberAreaWidth(), buttonBorderWidth, buttonBorderWidth, buttonBorderWidth); - } else { + if (creatorTheme()->flag(Theme::FlatToolBars)) { Theme::Color c = Theme::BackgroundColorDark; if (hovered) @@ -706,13 +697,22 @@ void OutputPaneToggleButton::paintEvent(QPaintEvent*) if (c != Theme::BackgroundColorDark) p.fillRect(rect(), creatorTheme()->color(c)); + } else { + if (isDown()) + image = &panelButtonPressed; + else if (isChecked()) + image = hovered ? &panelButtonCheckedHover : &panelButtonChecked; + else + image = hovered ? &panelButtonHover : &panelButton; + if (image) + StyleHelper::drawCornerImage(*image, &p, rect(), numberAreaWidth(), buttonBorderWidth, buttonBorderWidth, buttonBorderWidth); } if (m_flashTimer->state() == QTimeLine::Running) { QColor c = creatorTheme()->color(Theme::OutputPaneButtonFlashColor); c.setAlpha (m_flashTimer->currentFrame()); - QRect r = (creatorTheme()->widgetStyle() == Theme::StyleFlat) + QRect r = creatorTheme()->flag(Theme::FlatToolBars) ? rect() : rect().adjusted(numberAreaWidth(), 1, -1, -1); p.fillRect(r, c); } @@ -781,7 +781,7 @@ QSize OutputPaneManageButton::sizeHint() const void OutputPaneManageButton::paintEvent(QPaintEvent*) { QPainter p(this); - if (creatorTheme()->widgetStyle() == Theme::StyleDefault) { + if (!creatorTheme()->flag(Theme::FlatToolBars)) { static const QImage button(StyleHelper::dpiSpecificImageFile(QStringLiteral(":/core/images/panel_manage_button.png"))); StyleHelper::drawCornerImage(button, &p, rect(), buttonBorderWidth, buttonBorderWidth, buttonBorderWidth, buttonBorderWidth); } diff --git a/src/plugins/coreplugin/progressmanager/futureprogress.cpp b/src/plugins/coreplugin/progressmanager/futureprogress.cpp index dd1a9bf59f7..938570c5e4f 100644 --- a/src/plugins/coreplugin/progressmanager/futureprogress.cpp +++ b/src/plugins/coreplugin/progressmanager/futureprogress.cpp @@ -295,7 +295,7 @@ void FutureProgress::mousePressEvent(QMouseEvent *event) void FutureProgress::paintEvent(QPaintEvent *) { QPainter p(this); - if (creatorTheme()->widgetStyle() == Theme::StyleFlat) { + if (creatorTheme()->flag(Theme::FlatToolBars)) { p.fillRect(rect(), StyleHelper::baseColor()); } else { QLinearGradient grad = StyleHelper::statusBarGradient(rect()); diff --git a/src/plugins/coreplugin/progressmanager/progressbar.cpp b/src/plugins/coreplugin/progressmanager/progressbar.cpp index 13481968939..751e221fd7f 100644 --- a/src/plugins/coreplugin/progressmanager/progressbar.cpp +++ b/src/plugins/coreplugin/progressmanager/progressbar.cpp @@ -295,7 +295,7 @@ void ProgressBar::paintEvent(QPaintEvent *) const QColor c = creatorTheme()->color(themeColor); //draw the progress bar - if (creatorTheme()->widgetStyle() == Theme::StyleFlat) { + if (creatorTheme()->flag(Theme::FlatToolBars)) { p.fillRect(rect.adjusted(2, 2, -2, -2), creatorTheme()->color(Theme::ProgressBarBackgroundColor)); p.fillRect(inner, c); @@ -336,7 +336,7 @@ void ProgressBar::paintEvent(QPaintEvent *) const bool hover = m_cancelRect.contains(mapFromGlobal(QCursor::pos())); const QRectF cancelVisualRect(m_cancelRect.adjusted(0, 1, -2, -2)); int intensity = hover ? 90 : 70; - if (creatorTheme()->widgetStyle() != Theme::StyleFlat) { + if (!creatorTheme()->flag(Theme::FlatToolBars)) { QLinearGradient grad(cancelVisualRect.topLeft(), cancelVisualRect.bottomLeft()); QColor buttonColor(intensity, intensity, intensity, 255); grad.setColorAt(0, buttonColor.lighter(130)); diff --git a/src/plugins/coreplugin/progressmanager/progressmanager.cpp b/src/plugins/coreplugin/progressmanager/progressmanager.cpp index 2533e706052..9254997c18a 100644 --- a/src/plugins/coreplugin/progressmanager/progressmanager.cpp +++ b/src/plugins/coreplugin/progressmanager/progressmanager.cpp @@ -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); diff --git a/src/plugins/projectexplorer/miniprojecttargetselector.cpp b/src/plugins/projectexplorer/miniprojecttargetselector.cpp index f4bef004843..035c5eaa120 100644 --- a/src/plugins/projectexplorer/miniprojecttargetselector.cpp +++ b/src/plugins/projectexplorer/miniprojecttargetselector.cpp @@ -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)); diff --git a/src/plugins/projectexplorer/panelswidget.cpp b/src/plugins/projectexplorer/panelswidget.cpp index ee587f889f8..25b10b8a9a3 100644 --- a/src/plugins/projectexplorer/panelswidget.cpp +++ b/src/plugins/projectexplorer/panelswidget.cpp @@ -85,7 +85,7 @@ void RootWidget::paintEvent(QPaintEvent *e) { QWidget::paintEvent(e); - if (creatorTheme()->widgetStyle() == Theme::StyleDefault) { + if (!creatorTheme()->flag(Theme::FlatToolBars)) { // draw separator line to the right of the settings panel QPainter painter(this); QColor light = StyleHelper::mergedColors( diff --git a/src/plugins/qmldesigner/components/navigator/navigatortreeview.cpp b/src/plugins/qmldesigner/components/navigator/navigatortreeview.cpp index 72de3a7cd0d..94dab63cd76 100644 --- a/src/plugins/qmldesigner/components/navigator/navigatortreeview.cpp +++ b/src/plugins/qmldesigner/components/navigator/navigatortreeview.cpp @@ -170,7 +170,7 @@ NavigatorTreeView::NavigatorTreeView(QWidget *parent) void NavigatorTreeView::drawSelectionBackground(QPainter *painter, const QStyleOption &option) { painter->save(); - if (Utils::creatorTheme()->widgetStyle() == Utils::Theme::StyleFlat) { + if (Utils::creatorTheme()->flag(Utils::Theme::FlatToolBars)) { painter->setOpacity(0.5); painter->fillRect(option.rect, option.palette.color(QPalette::Highlight)); } else {