summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-12-23 17:27:16 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-12-23 17:27:16 (GMT)
commit08f963176b24c4c20a96717ddb2241ba1410b0a1 (patch)
tree5c1123c3677efc05631d31fd81dbc475d97070f0
parentd3d6cd530ac5bb4ff36680f095438a5c7f98b423 (diff)
parent15f6124da9c2cf70e74a1e0e6f89c27d17ec9d29 (diff)
downloadQt-08f963176b24c4c20a96717ddb2241ba1410b0a1.zip
Qt-08f963176b24c4c20a96717ddb2241ba1410b0a1.tar.gz
Qt-08f963176b24c4c20a96717ddb2241ba1410b0a1.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public: Fix fullscreen/Maximized dialog misplacement in Symbian
-rw-r--r--src/gui/dialogs/qdialog.cpp24
1 files changed, 18 insertions, 6 deletions
diff --git a/src/gui/dialogs/qdialog.cpp b/src/gui/dialogs/qdialog.cpp
index 16ea045..bcf952c 100644
--- a/src/gui/dialogs/qdialog.cpp
+++ b/src/gui/dialogs/qdialog.cpp
@@ -899,9 +899,21 @@ bool QDialog::symbianAdjustedPosition()
{
#if defined(Q_WS_S60)
QPoint p;
- const bool doS60Positioning = !(isFullScreen()||isMaximized());
- if (doS60Positioning) {
- QPoint oldPos = pos();
+ QPoint oldPos = pos();
+ if (isFullScreen()) {
+ p.setX(0);
+ p.setY(0);
+ } else if (isMaximized()) {
+ TRect statusPaneRect = TRect();
+ if (S60->screenHeightInPixels > S60->screenWidthInPixels) {
+ AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EStatusPane, statusPaneRect);
+ } else {
+ AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EStaconTop, statusPaneRect);
+ }
+
+ p.setX(0);
+ p.setY(statusPaneRect.Height());
+ } else {
// naive way to deduce screen orientation
if (S60->screenHeightInPixels > S60->screenWidthInPixels) {
int cbaHeight;
@@ -937,10 +949,10 @@ bool QDialog::symbianAdjustedPosition()
p.setX(qMax(0,S60->screenWidthInPixels - width()));
}
}
- if (oldPos != p || p.y() < 0)
- move(p);
}
- return doS60Positioning;
+ if (oldPos != p || p.y() < 0)
+ move(p);
+ return true;
#else
// TODO - check positioning requirement for Symbian, non-s60
return false;