diff options
author | Sami Merila <sami.merila@nokia.com> | 2011-05-23 11:57:20 (GMT) |
---|---|---|
committer | Sami Merila <sami.merila@nokia.com> | 2011-05-23 11:57:20 (GMT) |
commit | 95570aee41ddb620f3b661e2baddc428ebe35326 (patch) | |
tree | 49b4ff4161d7d4f3deb3f083e15e98f829796092 /src/gui/styles | |
parent | 26b640f62b789f26a4a1e16b602e3b5ced76888b (diff) | |
download | Qt-95570aee41ddb620f3b661e2baddc428ebe35326.zip Qt-95570aee41ddb620f3b661e2baddc428ebe35326.tar.gz Qt-95570aee41ddb620f3b661e2baddc428ebe35326.tar.bz2 |
QS60Style: icon is not shown correctly in a menu item in all cases
Style was using a pixel metric value for the rect, when it has already
earlier calculated a correct size rect to use for an itemview item icon.
Use the calculated value, as it is correct in all cases (just icon,
icon + checkbox, icon + text, icon + checkbox + text).
Task-number: QTBUG-19330
Reviewed-by: Miikka Heikkinen
Diffstat (limited to 'src/gui/styles')
-rw-r--r-- | src/gui/styles/qs60style.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 1098364..63b45d3 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -1797,7 +1797,7 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option, drawPrimitive(PE_IndicatorMenuCheckMark, &optionCheckBox, painter, widget); //draw icon and/or checkState - QPixmap pix = menuItem->icon.pixmap(pixelMetric(PM_SmallIconSize), + QPixmap pix = menuItem->icon.pixmap(iconRect.width(), enabled ? QIcon::Normal : QIcon::Disabled); const bool itemWithIcon = !pix.isNull(); if (itemWithIcon) { |