summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorA-Team <ateam@pad.test.qt.nokia.com>2011-01-28 19:13:47 (GMT)
committerA-Team <ateam@pad.test.qt.nokia.com>2011-01-28 19:13:47 (GMT)
commitc3cdff4ea4d03e8d14f31b10a4d7e80ba0c397c2 (patch)
tree0bf5277cd8f0136172ba5675ea02a97d06c50c06 /src/gui/widgets
parent88b143ff819751570e83d2de601630024a9c9989 (diff)
parent5c91e32a6238fd112a7282443214c8686cda51de (diff)
downloadQt-c3cdff4ea4d03e8d14f31b10a4d7e80ba0c397c2.zip
Qt-c3cdff4ea4d03e8d14f31b10a4d7e80ba0c397c2.tar.gz
Qt-c3cdff4ea4d03e8d14f31b10a4d7e80ba0c397c2.tar.bz2
Merge branch '4.7-upstream' into 4.7-doc
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/qcombobox.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/gui/widgets/qcombobox.cpp b/src/gui/widgets/qcombobox.cpp
index 3e5f1b3..dbbf49a 100644
--- a/src/gui/widgets/qcombobox.cpp
+++ b/src/gui/widgets/qcombobox.cpp
@@ -2476,10 +2476,18 @@ void QComboBox::showPopup()
listRect.setWidth(listRect.height());
//by default popup is centered on screen in landscape
listRect.moveCenter(screen.center());
- if (staConTopRect.IsEmpty() && AknLayoutUtils::CbaLocation() != AknLayoutUtils::EAknCbaLocationBottom) {
- // landscape without stacon, menu should be at the right
- (opt.direction == Qt::LeftToRight) ? listRect.setRight(screen.right()) :
- listRect.setLeft(screen.left());
+ if (staConTopRect.IsEmpty()) {
+ TRect cbaRect = TRect();
+ AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EControlPane, cbaRect);
+ AknLayoutUtils::TAknCbaLocation cbaLocation = AknLayoutUtils::CbaLocation();
+ switch (cbaLocation) {
+ case AknLayoutUtils::EAknCbaLocationRight:
+ listRect.setRight(screen.right());
+ break;
+ case AknLayoutUtils::EAknCbaLocationLeft:
+ listRect.setLeft(screen.left());
+ break;
+ }
}
}
#endif