QWindowsVistaStyle: Fill menu popup with theme color
The background for menu items is not drawn and can lead to a transparent background when switching from QWindows11Style to QWindowVistaStyle at runtime. This patch fills the background of menu items with MENU_POPUPBACKGROUND. Fixes: QTBUG-125474 Change-Id: I246db15ec821f9bc46ba410293c41b7e24548716 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> (cherry picked from commit 3de6d6fd348668ff5179504e950ce20b15075391) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
8f89f45f42
commit
b33e0eac97
@ -2836,6 +2836,11 @@ void QWindowsVistaStyle::drawControl(ControlElement element, const QStyleOption
|
||||
}
|
||||
QRect rect = option->rect;
|
||||
|
||||
//fill popup background
|
||||
QWindowsThemeData popupbackgroundTheme(widget, painter, QWindowsVistaStylePrivate::MenuTheme,
|
||||
MENU_POPUPBACKGROUND, stateId, option->rect);
|
||||
d->drawBackground(popupbackgroundTheme);
|
||||
|
||||
//draw vertical menu line
|
||||
if (option->direction == Qt::LeftToRight)
|
||||
checkcol += rect.x();
|
||||
|
Loading…
x
Reference in New Issue
Block a user