summaryrefslogtreecommitdiffstats
path: root/src/gui/styles
diff options
context:
space:
mode:
authorFrans Englich <frans.englich@nokia.com>2009-09-30 13:11:39 (GMT)
committerFrans Englich <frans.englich@nokia.com>2009-09-30 13:11:39 (GMT)
commit7c33e0f95789af1f6c091db89581f8a26b10682d (patch)
treecb8faa2ab6ce19c85a8c0c90dc852db08375868e /src/gui/styles
parentda935e9df4c63490a7d2a716236f1e781c2d75a6 (diff)
parentc3ef2d3a6d9a6e35b05cbd8f370630d5dd85415e (diff)
downloadQt-7c33e0f95789af1f6c091db89581f8a26b10682d.zip
Qt-7c33e0f95789af1f6c091db89581f8a26b10682d.tar.gz
Qt-7c33e0f95789af1f6c091db89581f8a26b10682d.tar.bz2
Merge commit 'origin/4.6' into mmfphonon
Diffstat (limited to 'src/gui/styles')
-rw-r--r--src/gui/styles/qs60style.cpp19
-rw-r--r--src/gui/styles/qs60style.h3
2 files changed, 13 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:
diff --git a/src/gui/styles/qs60style.h b/src/gui/styles/qs60style.h
index fd18bc3..6be3197 100644
--- a/src/gui/styles/qs60style.h
+++ b/src/gui/styles/qs60style.h
@@ -76,6 +76,9 @@ public:
void unpolish(QWidget *widget);
void polish(QApplication *application);
void unpolish(QApplication *application);
+#ifndef Q_NO_USING_KEYWORD
+ using QCommonStyle::polish;
+#endif
void setStyleProperty(const char *name, const QVariant &value);
QVariant styleProperty(const char *name) const;