diff options
Diffstat (limited to 'src/gui/styles')
-rw-r--r-- | src/gui/styles/qs60style.cpp | 19 | ||||
-rw-r--r-- | src/gui/styles/qs60style.h | 3 |
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; |