summaryrefslogtreecommitdiffstats
path: root/src/gui/styles/qs60style.cpp
diff options
context:
space:
mode:
authorJanne Koskinen <janne.p.koskinen@digia.com>2009-12-23 13:34:35 (GMT)
committerJanne Koskinen <janne.p.koskinen@digia.com>2009-12-23 13:34:35 (GMT)
commitc0a4c266deeb867069b65b158ded3f7b9becfebf (patch)
tree3641277e204e22b0490f8d03f19b158c7e81cf96 /src/gui/styles/qs60style.cpp
parent01cf310d21b17d8f57911ae194eaa0ca2472d155 (diff)
parent5f7b681661d8067b3fd954f04b7a25d833f5c92a (diff)
downloadQt-c0a4c266deeb867069b65b158ded3f7b9becfebf.zip
Qt-c0a4c266deeb867069b65b158ded3f7b9becfebf.tar.gz
Qt-c0a4c266deeb867069b65b158ded3f7b9becfebf.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public into 4.6
Diffstat (limited to 'src/gui/styles/qs60style.cpp')
-rw-r--r--src/gui/styles/qs60style.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index ed86f5a..e370ed0 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -339,7 +339,7 @@ QColor QS60StylePrivate::lighterColor(const QColor &baseColor)
bool QS60StylePrivate::drawsOwnThemeBackground(const QWidget *widget)
{
- return qobject_cast<const QDialog *> (widget);
+ return (widget ? (widget->windowType() == Qt::Dialog) : false);
}
QFont QS60StylePrivate::s60Font(
@@ -372,7 +372,6 @@ void QS60StylePrivate::clearCaches(CacheClearReason reason)
case CC_LayoutChange:
// when layout changes, the colors remain in cache, but graphics and fonts can change
m_mappedFontsCache.clear();
- deleteBackground();
QPixmapCache::clear();
break;
case CC_ThemeChange:
@@ -2161,7 +2160,10 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti
|| qobject_cast<const QMenu *> (widget)
#endif //QT_NO_MENU
) {
- if (QS60StylePrivate::canDrawThemeBackground(option->palette.base()))
+ //Need extra check since dialogs have their own theme background
+ if (QS60StylePrivate::canDrawThemeBackground(option->palette.base()) &&
+ option->palette.window().texture().cacheKey() ==
+ QS60StylePrivate::m_themePalette->window().texture().cacheKey())
QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_OptionsMenu, painter, option->rect, flags);
else
commonStyleDraws = true;