diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2010-12-23 23:00:13 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2010-12-23 23:00:13 (GMT) |
commit | 8ff74f9008b8846624a9da299beb23949af7c249 (patch) | |
tree | 18be776689556fadb56a81fd4910b40ff76c9496 /src/gui/dialogs/qdialog.cpp | |
parent | 8565d6d123227615312a791ae7acc5b252db264a (diff) | |
parent | 08f963176b24c4c20a96717ddb2241ba1410b0a1 (diff) | |
download | Qt-8ff74f9008b8846624a9da299beb23949af7c249.zip Qt-8ff74f9008b8846624a9da299beb23949af7c249.tar.gz Qt-8ff74f9008b8846624a9da299beb23949af7c249.tar.bz2 |
Merge branch '4.7-upstream' into 4.7-water
Diffstat (limited to 'src/gui/dialogs/qdialog.cpp')
-rw-r--r-- | src/gui/dialogs/qdialog.cpp | 24 |
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; |