summaryrefslogtreecommitdiffstats
path: root/src
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-25 16:42:33 (GMT)
commitdab1b98d84293e863c920add25980393fad2e9cd (patch)
tree9f18d5a51cd8cdce5109addcfbdd8dd154a5c804 /src
parent5776ff26ec44bc6d10cff2a8f81e81c33c39570a (diff)
downloadQt-dab1b98d84293e863c920add25980393fad2e9cd.zip
Qt-dab1b98d84293e863c920add25980393fad2e9cd.tar.gz
Qt-dab1b98d84293e863c920add25980393fad2e9cd.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
Diffstat (limited to 'src')
-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();
}