summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJanne Anttila <janne.anttila@digia.com>2010-03-01 08:21:25 (GMT)
committerJanne Anttila <janne.anttila@digia.com>2010-03-01 08:22:12 (GMT)
commit8113f2d94afd4e25caf12edf9716b7e0a82de1a8 (patch)
treebb66cf5206ac04a77be3ce02d1318a138afe5b3b
parent1d8b860694c121527b1f964e1090aa2d1987075e (diff)
downloadQt-8113f2d94afd4e25caf12edf9716b7e0a82de1a8.zip
Qt-8113f2d94afd4e25caf12edf9716b7e0a82de1a8.tar.gz
Qt-8113f2d94afd4e25caf12edf9716b7e0a82de1a8.tar.bz2
Added orientation change support for show/showNormal widgets in S60.
Earlier the widget normalGeometry was calculated once when widget was made visible first time. Because geometry was not recalculated the widget displayed with show/showNormal did not change its location or size as a result of orientation change. This lead to unefficient screen usage. This commit makes widget to recalculate its normalGeometry as a result of orientation change, if developer has not set the widget position or size explicitly. Task-number: QTBUG-8551 Reviewed-by: Jason Barron
-rw-r--r--src/gui/kernel/qapplication_s60.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index cf8ce62..2a90ba6 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -1029,6 +1029,16 @@ void QSymbianControl::HandleResourceChange(int resourceType)
} else if (qwidget->isMaximized()) {
TRect r = static_cast<CEikAppUi*>(S60->appUi())->ClientRect();
SetExtent(r.iTl, r.Size());
+ } else if (!qwidget->isMinimized()){ // Normal geometry
+ if (!qwidget->testAttribute(Qt::WA_Resized)) {
+ qwidget->adjustSize();
+ qwidget->setAttribute(Qt::WA_Resized, false); //not a user resize
+ }
+ if (!qwidget->testAttribute(Qt::WA_Moved)) {
+ TRect r = static_cast<CEikAppUi*>(S60->appUi())->ClientRect();
+ SetPosition(r.iTl);
+ qwidget->setAttribute(Qt::WA_Moved, false); // not really an explicit position
+ }
}
break;
}