From 794d901c30e48f75ed04e996b6c2127dc79a09ef Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Mon, 4 Jul 2016 13:57:19 +0200 Subject: [PATCH] Core: Draw the separator also under a menu with "FlatMenuBar" flag That separator under the Menu is drawn in the Classic and Flat themes. This change ensures that it is also drawn for themes with "FlatMenuBar". The "Flat Dark" and "Flat Light" need it. Change-Id: I43c932cfc4634330a08f86a33c9d74555e420a2a Reviewed-by: Thomas Hartmann --- src/plugins/coreplugin/manhattanstyle.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/plugins/coreplugin/manhattanstyle.cpp b/src/plugins/coreplugin/manhattanstyle.cpp index 95ee18266bb..af9c1dc9c37 100644 --- a/src/plugins/coreplugin/manhattanstyle.cpp +++ b/src/plugins/coreplugin/manhattanstyle.cpp @@ -790,16 +790,16 @@ void ManhattanStyle::drawControl(ControlElement element, const QStyleOption *opt break; case CE_MenuBarEmptyArea: { - if (!creatorTheme()->flag(Theme::FlatMenuBar)) { - StyleHelper::menuGradient(painter, option->rect, option->rect); - painter->save(); - painter->setPen(StyleHelper::borderColor()); - painter->drawLine(option->rect.bottomLeft() + QPointF(0.5, 0.5), - option->rect.bottomRight() + QPointF(0.5, 0.5)); - painter->restore(); - } else { + if (creatorTheme()->flag(Theme::FlatMenuBar)) painter->fillRect(option->rect, StyleHelper::baseColor()); - } + else + StyleHelper::menuGradient(painter, option->rect, option->rect); + + painter->save(); + painter->setPen(StyleHelper::borderColor()); + painter->drawLine(option->rect.bottomLeft() + QPointF(0.5, 0.5), + option->rect.bottomRight() + QPointF(0.5, 0.5)); + painter->restore(); } break;