summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-04-15 13:01:39 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-04-15 13:01:39 (GMT)
commit9ecd481a859977660b68a57d3b2203f75377ccc4 (patch)
treed54680aff6fb016da0402abf7ef706ba0e9ffdd5
parentb4b45ecbd79f6dfcbc1a0c1a11b06cec880acdf4 (diff)
parent3fdf7e7a120b72819c5a0997ddb65951d4889813 (diff)
downloadQt-9ecd481a859977660b68a57d3b2203f75377ccc4.zip
Qt-9ecd481a859977660b68a57d3b2203f75377ccc4.tar.gz
Qt-9ecd481a859977660b68a57d3b2203f75377ccc4.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public: '#' gets inserted to editor when changing FEP modes ComboBox popuplist is not correctly layouted in fullscreen mode Dialogs in landscape mode are not correctly positioned Slider graphics does not look correct in N95 (part2)
-rw-r--r--src/gui/dialogs/qdialog.cpp41
-rw-r--r--src/gui/inputmethod/qcoefepinputcontext_s60.cpp1
-rw-r--r--src/gui/styles/qs60style.cpp3
-rw-r--r--src/gui/widgets/qcombobox.cpp28
4 files changed, 47 insertions, 26 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);
diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
index 94036d0..b42e0ab 100644
--- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
+++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
@@ -782,7 +782,6 @@ void QCoeFepInputContext::commitCurrentString(bool cancelFepTransaction)
if (w->inputMethodQuery(Qt::ImCursorPosition).toInt() != m_cursorPos)
longPress = 1;
}
- return;
}
QList<QInputMethodEvent::Attribute> attributes;
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index 3259d82..7587343 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -548,11 +548,11 @@ void QS60StylePrivate::drawRow(QS60StyleEnums::SkinParts start,
startEndSize.scale(rect.size(), Qt::KeepAspectRatio);
QRect startRect = QRect(rect.topLeft(), startEndSize);
- startRect.setHeight(rect.height());
QRect middleRect = rect;
QRect endRect;
if (orientation == Qt::Horizontal) {
+ startRect.setHeight(rect.height());
startRect.setWidth(qMin((rect.width() >> 1) - 1, startRect.width()));
endRect = startRect.translated(rect.width() - startRect.width(), 0);
middleRect.adjust(startRect.width(), 0, -startRect.width(), 0);
@@ -562,6 +562,7 @@ void QS60StylePrivate::drawRow(QS60StyleEnums::SkinParts start,
endRect.adjust(overlap, 0, 0, 0);
}
} else {
+ startRect.setWidth(rect.width());
startRect.setHeight(qMin((rect.height() >> 1) - 1, startRect.height()));
endRect = startRect.translated(0, rect.height() - startRect.height());
middleRect.adjust(0, startRect.height(), 0, -startRect.height());
diff --git a/src/gui/widgets/qcombobox.cpp b/src/gui/widgets/qcombobox.cpp
index 7d02e14..12b1c4a 100644
--- a/src/gui/widgets/qcombobox.cpp
+++ b/src/gui/widgets/qcombobox.cpp
@@ -76,6 +76,10 @@
#ifndef QT_NO_EFFECTS
# include <private/qeffects_p.h>
#endif
+#if defined(Q_WS_S60)
+#include "private/qt_s60_p.h"
+#endif
+
QT_BEGIN_NAMESPACE
QComboBoxPrivate::QComboBoxPrivate()
@@ -2449,11 +2453,16 @@ void QComboBox::showPopup()
// in portait, menu should be positioned above softkeys
listRect.moveBottom(screen.bottom());
} else {
- // landscape, menu should be at the right and horizontally centered
+ TRect staConTopRect = TRect();
+ AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EStaconTop, staConTopRect);
listRect.setWidth(listRect.height());
+ //by default popup is centered on screen in landscape
listRect.moveCenter(screen.center());
- (opt.direction == Qt::LeftToRight) ? listRect.setRight(screen.right()) :
- listRect.setLeft(screen.left());
+ if (staConTopRect.IsEmpty()) {
+ // landscape without stacon, menu should be at the right
+ (opt.direction == Qt::LeftToRight) ? listRect.setRight(screen.right()) :
+ listRect.setLeft(screen.left());
+ }
}
#endif
} else if (!boundToScreen || listRect.height() <= belowHeight) {
@@ -2681,13 +2690,18 @@ void QComboBox::changeEvent(QEvent *e)
// in portait, menu should be positioned above softkeys
listRect.moveBottom(screen.bottom());
} else {
- // landscape, menu should be at the right and horizontally centered
+ TRect staConTopRect = TRect();
+ AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EStaconTop, staConTopRect);
listRect.setWidth(listRect.height());
+ //by default popup is centered on screen in landscape
listRect.moveCenter(screen.center());
- (opt.direction == Qt::LeftToRight) ? listRect.setRight(screen.right()) :
- listRect.setLeft(screen.left());
+ if (staConTopRect.IsEmpty()) {
+ // landscape without stacon, menu should be at the right
+ (opt.direction == Qt::LeftToRight) ? listRect.setRight(screen.right()) :
+ listRect.setLeft(screen.left());
+ }
+ d->container->setGeometry(listRect);
}
- d->container->setGeometry(listRect);
}
}
#endif