QWindowsVistaStyle: Fix CE_MenuBarItem with QStyleSheetStyle.
Do not paint over CE_MenuBarItem when the palette is set to transparent by QStyleSheetStyle. Task-number: QTBUG-49115 Change-Id: Ib364017179d0852490daad094361eae0ead4fd5f Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
This commit is contained in:
parent
721d7d383d
commit
2fe10c8dd0
@ -1143,7 +1143,7 @@ void QWindowsVistaStyle::drawControl(ControlElement element, const QStyleOption
|
|||||||
if (!proxy()->styleHint(SH_UnderlineShortcut, mbi, widget))
|
if (!proxy()->styleHint(SH_UnderlineShortcut, mbi, widget))
|
||||||
alignment |= Qt::TextHideMnemonic;
|
alignment |= Qt::TextHideMnemonic;
|
||||||
|
|
||||||
if (widget) { // Not needed for QtQuick Controls
|
if (widget && mbi->palette.color(QPalette::Window) != Qt::transparent) { // Not needed for QtQuick Controls
|
||||||
//The rect adjustment is a workaround for the menu not really filling its background.
|
//The rect adjustment is a workaround for the menu not really filling its background.
|
||||||
XPThemeData theme(widget, painter,
|
XPThemeData theme(widget, painter,
|
||||||
QWindowsXPStylePrivate::MenuTheme,
|
QWindowsXPStylePrivate::MenuTheme,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user