summaryrefslogtreecommitdiffstats
path: root/src/gui/styles
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-04-01 16:06:23 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-04-01 16:06:23 (GMT)
commitf707672eb4c51ea82fbd98e1da16ece61a74c690 (patch)
treef276d6ae14986b29cf29da411691b57d3dd47a89 /src/gui/styles
parent1c3fa677ee494f8982c99b468b4a4fcad8aa04c7 (diff)
parent14de8cecfa5b5428d597c9cca111ee0f3f89502f (diff)
downloadQt-f707672eb4c51ea82fbd98e1da16ece61a74c690.zip
Qt-f707672eb4c51ea82fbd98e1da16ece61a74c690.tar.gz
Qt-f707672eb4c51ea82fbd98e1da16ece61a74c690.tar.bz2
Merge branch 4.7 into qt-master-from-4.7
Diffstat (limited to 'src/gui/styles')
-rw-r--r--src/gui/styles/qs60style.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index 2d9b6cd..fbba09d 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -2282,8 +2282,9 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti
//Need extra check since dialogs have their own theme background
if (QS60StylePrivate::canDrawThemeBackground(option->palette.base(), widget)
&& QS60StylePrivate::equalToThemePalette(option->palette.window().texture().cacheKey(), QPalette::Window)) {
+ const bool comboMenu = qobject_cast<const QComboBoxListView *>(widget);
// Add margin area to the background, to avoid background being cut for first and last item.
- const int verticalMenuAdjustment = QS60StylePrivate::pixelMetric(PM_MenuVMargin);
+ const int verticalMenuAdjustment = comboMenu ? QS60StylePrivate::pixelMetric(PM_MenuVMargin) : 0;
const QRect adjustedMenuRect = option->rect.adjusted(0, -verticalMenuAdjustment, 0, verticalMenuAdjustment);
QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_PopupBackground, painter, adjustedMenuRect, flags);
} else {
@@ -2641,7 +2642,7 @@ QSize QS60Style::sizeFromContents(ContentsType ct, const QStyleOption *opt,
case CT_ItemViewItem:
if (const QStyleOptionMenuItem *menuItem = qstyleoption_cast<const QStyleOptionMenuItem *>(opt)) {
if (menuItem->menuItemType == QStyleOptionMenuItem::Separator) {
- sz = QSize(menuItem->rect.width(), 1);
+ sz = QSize(menuItem->rect.width() - 2 * pixelMetric(PM_MenuHMargin) - 2 * QS60StylePrivate::pixelMetric(PM_FrameCornerWidth), 1);
break;
}
}