summaryrefslogtreecommitdiffstats
path: root/src/gui/styles
diff options
context:
space:
mode:
authorJani Hautakangas <ext-jani.hautakangas@nokia.com>2009-09-30 08:37:58 (GMT)
committerJani Hautakangas <ext-jani.hautakangas@nokia.com>2009-09-30 08:44:16 (GMT)
commit6889622da4d17e5cd97e483deb780d83e3bb4548 (patch)
treec851e8ef747553f1e5fa7daebd81e632ef9f0b59 /src/gui/styles
parent2dd684b0342be3ddc1c16defef0aa1dc76d82890 (diff)
downloadQt-6889622da4d17e5cd97e483deb780d83e3bb4548.zip
Qt-6889622da4d17e5cd97e483deb780d83e3bb4548.tar.gz
Qt-6889622da4d17e5cd97e483deb780d83e3bb4548.tar.bz2
Symbian specific fixes to QComboBox
Fixes QComboBox edit field geometry in s60style Fixes softkey crash when setting a custom itemview to QComboBox Fixes Symbian keyboard input interval in tst_QComboBox::virtualAutocompletion() Reviewed-by: Sami Merila
Diffstat (limited to 'src/gui/styles')
-rw-r--r--src/gui/styles/qs60style.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index 1e57167..6bdb79e 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -2397,8 +2397,6 @@ QRect QS60Style::subControlRect(ComplexControl control, const QStyleOptionComple
// lets use spinbox frame here as well, as no combobox specific value available.
const int frameThickness = cmb->frame ? pixelMetric(PM_SpinBoxFrameWidth, cmb, widget) : 0;
const int buttonWidth = QS60StylePrivate::pixelMetric(QStyle::PM_ButtonIconSize);
- const int xposMod = (cmb->rect.x()) + width - buttonMargin - buttonWidth;
- const int ypos = cmb->rect.y();
QSize buttonSize;
buttonSize.setHeight(qMax(8, (cmb->rect.height()>>1) - frameThickness)); //minimum of 8 pixels
@@ -2406,15 +2404,18 @@ QRect QS60Style::subControlRect(ComplexControl control, const QStyleOptionComple
buttonSize = buttonSize.expandedTo(QApplication::globalStrut());
switch (scontrol) {
case SC_ComboBoxArrow:
- ret.setRect(xposMod, ypos + buttonMargin, buttonWidth, height - 2*buttonMargin);
+ ret.setRect(
+ ret.x() + ret.width() - buttonMargin - buttonWidth,
+ ret.y() + buttonMargin,
+ buttonWidth,
+ height - 2*buttonMargin);
break;
case SC_ComboBoxEditField: {
- const int withFrameX = cmb->rect.x() + cmb->rect.width() - frameThickness - buttonSize.width();
- ret = QRect(
- frameThickness,
- frameThickness,
- withFrameX - frameThickness,
- cmb->rect.height() - 2*frameThickness);
+ ret.setRect(
+ ret.x() + frameThickness,
+ ret.y() + frameThickness,
+ ret.width() - 2*frameThickness - buttonSize.width(),
+ ret.height() - 2*frameThickness);
}
break;
default: