summaryrefslogtreecommitdiffstats
path: root/src/gui/dialogs/qdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/dialogs/qdialog.cpp')
-rw-r--r--src/gui/dialogs/qdialog.cpp41
1 files changed, 24 insertions, 17 deletions
diff --git a/src/gui/dialogs/qdialog.cpp b/src/gui/dialogs/qdialog.cpp
index 25ba016..8b40b52 100644
--- a/src/gui/dialogs/qdialog.cpp
+++ b/src/gui/dialogs/qdialog.cpp
@@ -904,26 +904,33 @@ bool QDialog::s60AdjustedPosition()
} else {
cbaHeight = qt_TSize2QSize(bgContainer->Size()).height();
}
- p.setY(S60->screenHeightInPixels-height()-cbaHeight);
+ p.setY(S60->screenHeightInPixels - height() - cbaHeight);
p.setX(0);
} else {
const int scrollbarWidth = style()->pixelMetric(QStyle::PM_ScrollBarExtent);
- TRect cbaRect = TRect();
- AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EControlPane, cbaRect);
- AknLayoutUtils::TAknCbaLocation cbaLocation = AknLayoutUtils::CbaLocation();
- switch (cbaLocation) {
- case AknLayoutUtils::EAknCbaLocationBottom:
- p.setY(S60->screenHeightInPixels - height()-cbaRect.Height());
- p.setX((S60->screenWidthInPixels - width())>>1);
- break;
- case AknLayoutUtils::EAknCbaLocationRight:
- p.setY((S60->screenHeightInPixels - height())>>1);
- p.setX(qMax(0,S60->screenWidthInPixels-width()-scrollbarWidth-cbaRect.Width()));
- break;
- case AknLayoutUtils::EAknCbaLocationLeft:
- p.setY((S60->screenHeightInPixels - height())>>1);
- p.setX(qMax(0,scrollbarWidth+cbaRect.Width()));
- break;
+ TRect staConTopRect = TRect();
+ AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EStaconTop, staConTopRect);
+ if (staConTopRect.IsEmpty()) {
+ TRect cbaRect = TRect();
+ AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EControlPane, cbaRect);
+ AknLayoutUtils::TAknCbaLocation cbaLocation = AknLayoutUtils::CbaLocation();
+ switch (cbaLocation) {
+ case AknLayoutUtils::EAknCbaLocationBottom:
+ p.setY(S60->screenHeightInPixels - height() - cbaRect.Height());
+ p.setX((S60->screenWidthInPixels - width()) >> 1);
+ break;
+ case AknLayoutUtils::EAknCbaLocationRight:
+ p.setY((S60->screenHeightInPixels - height()) >> 1);
+ p.setX(qMax(0,S60->screenWidthInPixels - width() - scrollbarWidth - cbaRect.Width()));
+ break;
+ case AknLayoutUtils::EAknCbaLocationLeft:
+ p.setY((S60->screenHeightInPixels - height()) >> 1);
+ p.setX(qMax(0,scrollbarWidth + cbaRect.Width()));
+ break;
+ }
+ } else {
+ p.setY((S60->screenHeightInPixels - height()) >> 1);
+ p.setX(qMax(0,S60->screenWidthInPixels - width()));
}
}
move(p);