diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-06-10 16:46:24 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-06-10 16:46:24 (GMT) |
commit | 497da277770ccf37e05a7b519afd5206601a7cf1 (patch) | |
tree | fe3e4bd1d5ceef59e68fdfa104aa97e45ffdd0bf /src/gui | |
parent | 84bb6afc5c9e6ffa9b2a2913ba3849020ec35abe (diff) | |
parent | f3e1f11b79060eb7cad0a8e79396d51ded3ed0a6 (diff) | |
download | Qt-497da277770ccf37e05a7b519afd5206601a7cf1.zip Qt-497da277770ccf37e05a7b519afd5206601a7cf1.tar.gz Qt-497da277770ccf37e05a7b519afd5206601a7cf1.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public:
Update 4.7 def files
QS60Style: QComboBox displays checkboxes for items
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/styles/qs60style.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index d28e1d9..4992e34 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -1750,6 +1750,12 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option, } const bool enabled = optionMenuItem.state & State_Enabled; const bool checkable = optionMenuItem.checkType != QStyleOptionMenuItem::NotCheckable; + bool ignoreCheckMark = false; + +#ifndef QT_NO_COMBOBOX + if (qobject_cast<const QComboBox*>(widget)) + ignoreCheckMark = true; //ignore the checkmarks provided by the QComboMenuDelegate +#endif uint text_flags = Qt::AlignLeading | Qt::TextShowMnemonic | Qt::TextDontClip | Qt::TextSingleLine | Qt::AlignVCenter; @@ -1787,7 +1793,8 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option, iconRect.translate(-optionCheckBox.rect.width() - vSpacing, 0); optionCheckBox.rect.translate(textRect.width() + iconRect.width(), 0); } - drawPrimitive(PE_IndicatorMenuCheckMark, &optionCheckBox, painter, widget); + if (!ignoreCheckMark) + drawPrimitive(PE_IndicatorMenuCheckMark, &optionCheckBox, painter, widget); } //draw icon and/or checkState QPixmap pix = menuItem->icon.pixmap(pixelMetric(PM_SmallIconSize), |