summaryrefslogtreecommitdiffstats
path: root/src/gui/dialogs/qdialog.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-12-24 16:03:44 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-12-24 16:03:44 (GMT)
commit0e3ffb05e0de1abc740ba5fb33dbbe79c64f1578 (patch)
tree490c91a448bd1745cacb43df9585497022ffe24f /src/gui/dialogs/qdialog.cpp
parent0f35089dec33ff0b2d424601b031dcd4446d3438 (diff)
parent08f963176b24c4c20a96717ddb2241ba1410b0a1 (diff)
downloadQt-0e3ffb05e0de1abc740ba5fb33dbbe79c64f1578.zip
Qt-0e3ffb05e0de1abc740ba5fb33dbbe79c64f1578.tar.gz
Qt-0e3ffb05e0de1abc740ba5fb33dbbe79c64f1578.tar.bz2
Merge branch 4.7 into qt-master-from-4.7
Diffstat (limited to 'src/gui/dialogs/qdialog.cpp')
-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 0f98b56..e522dc9 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;