summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlessandro Portale <alessandro.portale@nokia.com>2009-11-25 16:41:34 (GMT)
committerAlessandro Portale <alessandro.portale@nokia.com>2009-11-26 12:55:01 (GMT)
commit89c537dbd1b4bfbfcb3a3e3644c093b5a6e85469 (patch)
tree1560a1874f5b91e1e71c4d960c2433c570e9ae29
parent4c3539dfbc65d5decdd842d4181f9aa3d38d213c (diff)
downloadQt-89c537dbd1b4bfbfcb3a3e3644c093b5a6e85469.zip
Qt-89c537dbd1b4bfbfcb3a3e3644c093b5a6e85469.tar.gz
Qt-89c537dbd1b4bfbfcb3a3e3644c093b5a6e85469.tar.bz2
Fixing background painting after orientation switch.
Fixing previous fixes of QS60StylePrivate::setBackgroundTexture with commit SHAs a80e58335e69c8ce96d1596e0ed2d14e424a0d5e and d4089399a3ab7548a864d5a399e08df85c444783 Now, the palette gets the updated background brush and the palette is actually set as application palette. Also making sure that QS60StylePrivate::handleDynamicLayoutVariantSwitch does the right things in the right order. So that Table headers are not broken after orientaion switch. Task-number: QTBUG-6125 Task-number: QT-1478 Reviewed-by: Shane Kearns
-rw-r--r--src/gui/styles/qs60style.cpp1
-rw-r--r--src/gui/styles/qs60style_s60.cpp2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index b5c0d4f..2137244 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -475,6 +475,7 @@ void QS60StylePrivate::setBackgroundTexture(QApplication *app) const
QPalette applicationPalette = QApplication::palette();
applicationPalette.setBrush(QPalette::Window, backgroundTexture());
setThemePalette(&applicationPalette);
+ QApplication::setPalette(applicationPalette);
}
void QS60StylePrivate::deleteBackground()
diff --git a/src/gui/styles/qs60style_s60.cpp b/src/gui/styles/qs60style_s60.cpp
index a8dbf8d..48b8fad 100644
--- a/src/gui/styles/qs60style_s60.cpp
+++ b/src/gui/styles/qs60style_s60.cpp
@@ -1324,9 +1324,9 @@ QS60Style::QS60Style()
void QS60StylePrivate::handleDynamicLayoutVariantSwitch()
{
clearCaches(QS60StylePrivate::CC_LayoutChange);
+ setBackgroundTexture(qApp);
setActiveLayout();
refreshUI();
- setBackgroundTexture(qApp);
foreach (QWidget *widget, QApplication::allWidgets())
widget->ensurePolished();
}