summaryrefslogtreecommitdiffstats
path: root/src/gui/styles/qs60style.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2009-12-23 12:16:45 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2009-12-23 12:16:45 (GMT)
commita1e716d5683261624be40b9cfaea96048ed40cd5 (patch)
tree8c53b7f393e6df68f40346e1ed52b2aee275906c /src/gui/styles/qs60style.cpp
parent03ee83e15de7f5091d7322ac5765daec652b4b3e (diff)
parent7eb0abe8cd9f810905ec079e45ece1ed7fc9b9aa (diff)
downloadQt-a1e716d5683261624be40b9cfaea96048ed40cd5.zip
Qt-a1e716d5683261624be40b9cfaea96048ed40cd5.tar.gz
Qt-a1e716d5683261624be40b9cfaea96048ed40cd5.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public: Setting background color to a QDialog doesn't work QWidget with the window flag Qt::Dialog is not decorated as a dialog Device flickers badly when orientation change occurs Changed make sis only require .make.cache if QT_SIS_TARGET is not set.
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;