diff --git a/share/qtcreator/themes/dark.creatortheme b/share/qtcreator/themes/dark.creatortheme index 33c3c90bdb7..7c74fcce6c0 100644 --- a/share/qtcreator/themes/dark.creatortheme +++ b/share/qtcreator/themes/dark.creatortheme @@ -171,6 +171,7 @@ DrawIndicatorBranch=true DrawProgressBarSunken=false DrawSearchResultWidgetFrame=false DrawTargetSelectorBottom=false +DrawToolBarHighlights=true ApplyThemePaletteGlobally=true FlatSideBarIcons=true FlatProjectsMode=true diff --git a/share/qtcreator/themes/darkframe.creatortheme b/share/qtcreator/themes/darkframe.creatortheme index 7f29d5daea3..17d5cd4fd52 100644 --- a/share/qtcreator/themes/darkframe.creatortheme +++ b/share/qtcreator/themes/darkframe.creatortheme @@ -173,6 +173,7 @@ DrawIndicatorBranch=true DrawProgressBarSunken=false DrawSearchResultWidgetFrame=false DrawTargetSelectorBottom=false +DrawToolBarHighlights=false ApplyThemePaletteGlobally=false FlatSideBarIcons=true FlatProjectsMode=false diff --git a/share/qtcreator/themes/default.creatortheme b/share/qtcreator/themes/default.creatortheme index 63179e6785b..70c897834b3 100644 --- a/share/qtcreator/themes/default.creatortheme +++ b/share/qtcreator/themes/default.creatortheme @@ -165,6 +165,7 @@ DrawIndicatorBranch=false DrawProgressBarSunken=true DrawSearchResultWidgetFrame=true DrawTargetSelectorBottom=true +DrawToolBarHighlights=true ApplyThemePaletteGlobally=false FlatSideBarIcons=false FlatProjectsMode=false diff --git a/src/libs/utils/theme/theme.h b/src/libs/utils/theme/theme.h index 9ccd272e913..d67303ce0f9 100644 --- a/src/libs/utils/theme/theme.h +++ b/src/libs/utils/theme/theme.h @@ -256,6 +256,7 @@ public: DrawSearchResultWidgetFrame, DrawProgressBarSunken, DrawIndicatorBranch, + DrawToolBarHighlights, ComboBoxDrawTextShadow, DerivePaletteFromTheme, ApplyThemePaletteGlobally, diff --git a/src/plugins/coreplugin/manhattanstyle.cpp b/src/plugins/coreplugin/manhattanstyle.cpp index c5247716378..4d431b52020 100644 --- a/src/plugins/coreplugin/manhattanstyle.cpp +++ b/src/plugins/coreplugin/manhattanstyle.cpp @@ -830,32 +830,34 @@ void ManhattanStyle::drawControl(ControlElement element, const QStyleOption *opt else StyleHelper::verticalGradient(painter, gradientSpan, rect, drawLightColored); - if (!drawLightColored) - painter->setPen(StyleHelper::borderColor()); - else - painter->setPen(QColor(0x888888)); + if (creatorTheme()->flag(Theme::DrawToolBarHighlights)) { + if (!drawLightColored) + painter->setPen(StyleHelper::borderColor()); + else + painter->setPen(QColor(0x888888)); - if (horizontal) { - // 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 borderColor = drawLightColored - ? QColor(255, 255, 255, 180) : hightLight; - if (widget && widget->property("topBorder").toBool()) { - painter->drawLine(borderRect.topLeft(), borderRect.topRight()); - painter->setPen(borderColor); - painter->drawLine(borderRect.topLeft() + QPointF(0, 1), borderRect.topRight() + QPointF(0, 1)); + if (horizontal) { + // 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 borderColor = drawLightColored + ? QColor(255, 255, 255, 180) : hightLight; + if (widget && widget->property("topBorder").toBool()) { + painter->drawLine(borderRect.topLeft(), borderRect.topRight()); + painter->setPen(borderColor); + painter->drawLine(borderRect.topLeft() + QPointF(0, 1), borderRect.topRight() + QPointF(0, 1)); + } else { + painter->drawLine(borderRect.bottomLeft(), borderRect.bottomRight()); + painter->setPen(borderColor); + painter->drawLine(borderRect.topLeft(), borderRect.topRight()); + } } else { - painter->drawLine(borderRect.bottomLeft(), borderRect.bottomRight()); - painter->setPen(borderColor); - painter->drawLine(borderRect.topLeft(), borderRect.topRight()); + painter->drawLine(borderRect.topLeft(), borderRect.bottomLeft()); + painter->drawLine(borderRect.topRight(), borderRect.bottomRight()); } - } else { - painter->drawLine(borderRect.topLeft(), borderRect.bottomLeft()); - painter->drawLine(borderRect.topRight(), borderRect.bottomRight()); } } break;