diff options
author | Sami Merila <sami.merila@nokia.com> | 2011-01-26 12:27:35 (GMT) |
---|---|---|
committer | Sami Merila <sami.merila@nokia.com> | 2011-01-26 12:27:35 (GMT) |
commit | 208e8e87d338e8956f4dbb7243a7cc5ec6553f13 (patch) | |
tree | c9fb74504a2b33cd6d54ef0274be8111bbb90e36 /src/gui | |
parent | 54313b3ba81c276cf06c40c2420b1ff1f30e64c3 (diff) | |
download | Qt-208e8e87d338e8956f4dbb7243a7cc5ec6553f13.zip Qt-208e8e87d338e8956f4dbb7243a7cc5ec6553f13.tar.gz Qt-208e8e87d338e8956f4dbb7243a7cc5ec6553f13.tar.bz2 |
QComboBox popup incorrectly opened in Sym^3
QCombobox popup opens into incorrect position in Sym^3. This is due
to that there is a new layout in use, where softkeys are positioned
at the bottom. The current implementation just checks if native stacon
component is in use and if not, puts the popup to left/right border
of the application area (depending on UI direction).
Task-number: QTBUG-16886
Reviewed-by: Miikka Heikkinen
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/widgets/qcombobox.cpp | 16 |
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 |