forked from qt-creator/qt-creator
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 <Thomas.Hartmann@theqtcompany.com>
This commit is contained in:
committed by
Alessandro Portale
parent
b963ad78bb
commit
794d901c30
@@ -790,16 +790,16 @@ void ManhattanStyle::drawControl(ControlElement element, const QStyleOption *opt
|
||||
break;
|
||||
|
||||
case CE_MenuBarEmptyArea: {
|
||||
if (!creatorTheme()->flag(Theme::FlatMenuBar)) {
|
||||
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();
|
||||
} else {
|
||||
painter->fillRect(option->rect, StyleHelper::baseColor());
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
Reference in New Issue
Block a user