diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2010-12-25 00:00:11 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2010-12-25 00:00:11 (GMT) |
commit | 99dbc0dcff4ee20c993ff5fd691c33b975045612 (patch) | |
tree | b2de7f28c0c88785769c0831440abea37b6acc17 /src/gui/dialogs | |
parent | b048270432e43780dbef9a3e3bbf4b1ee2b4984b (diff) | |
parent | a50402893bd2d8bda37fc3ef2da3d8326445010a (diff) | |
download | Qt-99dbc0dcff4ee20c993ff5fd691c33b975045612.zip Qt-99dbc0dcff4ee20c993ff5fd691c33b975045612.tar.gz Qt-99dbc0dcff4ee20c993ff5fd691c33b975045612.tar.bz2 |
Merge branch 'master-upstream' into master-water
Diffstat (limited to 'src/gui/dialogs')
-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 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; |