summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlessandro Portale <alessandro.portale@nokia.com>2009-11-25 16:41:34 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2009-11-27 00:55:45 (GMT)
commitdd0fe90d3287df1fad7a1613e35c493d7667e7f8 (patch)
treec5b4f8fa069db5d9f8436c2ccf29be7241930249
parentc1d03a7aa71e8b1081fb263efcc925d8968af526 (diff)
downloadQt-dd0fe90d3287df1fad7a1613e35c493d7667e7f8.zip
Qt-dd0fe90d3287df1fad7a1613e35c493d7667e7f8.tar.gz
Qt-dd0fe90d3287df1fad7a1613e35c493d7667e7f8.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 (cherry picked from commit 89c537dbd1b4bfbfcb3a3e3644c093b5a6e85469)
-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 2b789aa..6e39efe 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -474,6 +474,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 2cada7a..bbccb40 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();
}