summaryrefslogtreecommitdiffstats
path: root/src/gui/dialogs/qdialog.cpp
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2010-12-23 13:53:43 (GMT)
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2010-12-23 13:53:43 (GMT)
commit15f6124da9c2cf70e74a1e0e6f89c27d17ec9d29 (patch)
tree21ddfa500e98bfa6b733d6650ad90ed19f3fcadd /src/gui/dialogs/qdialog.cpp
parente6694ebe4081b807b1bb0946e17e73840019ec6d (diff)
downloadQt-15f6124da9c2cf70e74a1e0e6f89c27d17ec9d29.zip
Qt-15f6124da9c2cf70e74a1e0e6f89c27d17ec9d29.tar.gz
Qt-15f6124da9c2cf70e74a1e0e6f89c27d17ec9d29.tar.bz2
Fix fullscreen/Maximized dialog misplacement in Symbian
Task-number: QTBUG-16277 Reviewed-by: Sami Merila
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 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;