From 99aef9769379a74accce481f6290a30bf8024216 Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Thu, 7 Jul 2011 13:08:05 +0300 Subject: Regression: Some QMenus are shown completely transparent in Symbian Fix for menu transparency (QTBUG-16857) unveiled an issue in the QS60Style when drawing QMenu background. Style skips drawing of the menu background, since placeHolder texture for QPalette::Window is not replaced with real background for menus. Therefore, we need to check if the widget's palette is still untouched when deciding whether or not to draw the menu background. Task-number: QTBUG-20255 Reviewed-by: Tomi Vihria --- src/gui/styles/qs60style.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 13157ff..bb2d701 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -506,8 +506,10 @@ bool QS60StylePrivate::equalToThemePalette(qint64 cacheKey, QPalette::ColorRole { if (!m_themePalette) return false; - if (cacheKey == m_themePalette->brush(role).texture().cacheKey()) + if ((m_placeHolderTexture && (cacheKey == m_placeHolderTexture->cacheKey())) + || (cacheKey == m_themePalette->brush(role).texture().cacheKey())) return true; + return false; } -- cgit v0.12