diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-07-05 16:06:20 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-07-05 16:06:20 (GMT) |
commit | 013fb92b20db4fc3dc6a7a7d4cd0a3a0c941472f (patch) | |
tree | a010c01402ae8c9284e483da767a454489efb479 /src/gui/styles/qs60style.cpp | |
parent | c018f01b8a97e9ae3dee12777fd1bde4c51f231e (diff) | |
parent | 6adc6f500e1d2f65a493a76baf35c5f11180edeb (diff) | |
download | Qt-013fb92b20db4fc3dc6a7a7d4cd0a3a0c941472f.zip Qt-013fb92b20db4fc3dc6a7a7d4cd0a3a0c941472f.tar.gz Qt-013fb92b20db4fc3dc6a7a7d4cd0a3a0c941472f.tar.bz2 |
Merge branch 4.7 into qt-4.8-from-4.7
Diffstat (limited to 'src/gui/styles/qs60style.cpp')
-rw-r--r-- | src/gui/styles/qs60style.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index b47b4c8..de45754 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -141,6 +141,7 @@ const struct QS60StylePrivate::frameElementCenter QS60StylePrivate::m_frameEleme {SE_Editor, QS60StyleEnums::SP_QsnFrInputCenter}, {SE_TableItemPressed, QS60StyleEnums::SP_QsnFrGridCenterPressed}, {SE_ListItemPressed, QS60StyleEnums::SP_QsnFrListCenterPressed}, + {SE_DialogBackground, QS60StyleEnums::SP_QsnFrPopupCenter}, }; static const int frameElementsCount = @@ -263,6 +264,9 @@ void QS60StylePrivate::drawSkinElement(SkinElements element, QPainter *painter, case SE_PopupBackground: drawFrame(SF_PopupBackground, painter, rect, flags | SF_PointNorth); break; + case SE_DialogBackground: + drawFrame(SF_DialogBackground, painter, rect, flags | SF_PointNorth); + break; case SE_SettingsList: drawFrame(SF_SettingsList, painter, rect, flags | SF_PointNorth); break; @@ -2261,10 +2265,14 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti if (QS60StylePrivate::canDrawThemeBackground(option->palette.base(), widget) && QS60StylePrivate::equalToThemePalette(option->palette.window().texture().cacheKey(), QPalette::Window)) { const bool comboMenu = qobject_cast<const QComboBoxListView *>(widget); + const bool menu = qobject_cast<const QMenu *>(widget); // Add margin area to the background, to avoid background being cut for first and last item. 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); + if (comboMenu || menu) + QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_PopupBackground, painter, adjustedMenuRect, flags); + else + QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_DialogBackground, painter, adjustedMenuRect, flags); } else { commonStyleDraws = true; } |