summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSami Merila <sami.merila@nokia.com>2010-04-26 10:55:41 (GMT)
committerSami Merila <sami.merila@nokia.com>2010-04-26 10:55:41 (GMT)
commit44fae8e280c71c835bcef5148f6b27946040a704 (patch)
tree77fc9a8b5e982b14e050582cc042f948d7b35b77 /src
parente728ee51a485c04d7edaa704bf9de94cbb6b6c2e (diff)
downloadQt-44fae8e280c71c835bcef5148f6b27946040a704.zip
Qt-44fae8e280c71c835bcef5148f6b27946040a704.tar.gz
Qt-44fae8e280c71c835bcef5148f6b27946040a704.tar.bz2
QS60Style: Menu separators are not drawn, yet they take up screen space
Currently, QS60Style does not draw menu separators at all, yet they are calculated to take screen estate. Remove the screen reservation from them. See also QTBUG-10054 for details to add menu separator support to style. Task-number: QTBUG-10191 Reviewed-by: Alessandro Portale
Diffstat (limited to 'src')
-rw-r--r--src/gui/styles/qs60style.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index 3d993da..90b8be3 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -2494,6 +2494,12 @@ QSize QS60Style::sizeFromContents(ContentsType ct, const QStyleOption *opt,
break;
case CT_MenuItem:
case CT_ItemViewItem:
+ if (const QStyleOptionMenuItem *menuItem = qstyleoption_cast<const QStyleOptionMenuItem *>(opt)) {
+ if (menuItem->menuItemType == QStyleOptionMenuItem::Separator) {
+ sz = QSize();
+ break;
+ }
+ }
sz = QCommonStyle::sizeFromContents( ct, opt, csz, widget);
if (QS60StylePrivate::isTouchSupported())
//Make itemview easier to use in touch devices