diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/styles/qs60style.cpp | 35 | ||||
-rw-r--r-- | src/gui/styles/qs60style_s60.cpp | 9 |
2 files changed, 15 insertions, 29 deletions
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 634cf00..d68ef89 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -1155,11 +1155,10 @@ void QS60Style::drawComplexControl(ComplexControl control, const QStyleOptionCom case Qt::UpArrow: pe = PE_IndicatorArrowUp; break; - case Qt::DownArrow: + default: pe = PE_IndicatorArrowDown; break; - default: - break; } + } toolButton.rect = button; drawPrimitive(pe, &toolButton, painter, widget); } @@ -1333,8 +1332,8 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option, if (const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option)) { const bool isDisabled = !(option->state & State_Enabled); const bool isFlat = button->features & QStyleOptionButton::Flat; - QS60StyleEnums::SkinParts skinPart; - QS60StylePrivate::SkinElements skinElement; + QS60StyleEnums::SkinParts skinPart = QS60StyleEnums::SP_QsnFrButtonCenterInactive; + QS60StylePrivate::SkinElements skinElement = QS60StylePrivate::SE_ButtonInactive; if (!isDisabled) { const bool isPressed = (option->state & State_Sunken) || (option->state & State_On); @@ -1345,11 +1344,6 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option, skinElement = isPressed ? QS60StylePrivate::SE_ButtonPressed : QS60StylePrivate::SE_ButtonNormal; } - } else { - if (isFlat) - skinPart =QS60StyleEnums::SP_QsnFrButtonCenterInactive; - else - skinElement = QS60StylePrivate::SE_ButtonInactive; } if (isFlat) QS60StylePrivate::drawSkinPart(skinPart, painter, option->rect, flags); @@ -2226,21 +2220,16 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti break; #ifndef QT_NO_TOOLBUTTON case PE_IndicatorArrowDown: + QS60StylePrivate::drawSkinPart(QS60StyleEnums::SP_QgnGrafScrollArrowDown, painter, option->rect, flags); + break; case PE_IndicatorArrowLeft: + QS60StylePrivate::drawSkinPart(QS60StyleEnums::SP_QgnGrafScrollArrowLeft, painter, option->rect, flags); + break; case PE_IndicatorArrowRight: - case PE_IndicatorArrowUp: { - QS60StyleEnums::SkinParts skinPart; - if (element==PE_IndicatorArrowDown) - skinPart = QS60StyleEnums::SP_QgnGrafScrollArrowDown; - else if (element==PE_IndicatorArrowLeft) - skinPart = QS60StyleEnums::SP_QgnGrafScrollArrowLeft; - else if (element==PE_IndicatorArrowRight) - skinPart = QS60StyleEnums::SP_QgnGrafScrollArrowRight; - else if (element==PE_IndicatorArrowUp) - skinPart = QS60StyleEnums::SP_QgnGrafScrollArrowUp; - - QS60StylePrivate::drawSkinPart(skinPart, painter, option->rect, flags); - } + QS60StylePrivate::drawSkinPart(QS60StyleEnums::SP_QgnGrafScrollArrowRight, painter, option->rect, flags); + break; + case PE_IndicatorArrowUp: + QS60StylePrivate::drawSkinPart(QS60StyleEnums::SP_QgnGrafScrollArrowUp, painter, option->rect, flags); break; #endif //QT_NO_TOOLBUTTON #ifndef QT_NO_SPINBOX diff --git a/src/gui/styles/qs60style_s60.cpp b/src/gui/styles/qs60style_s60.cpp index f272ff4..f8a6b96 100644 --- a/src/gui/styles/qs60style_s60.cpp +++ b/src/gui/styles/qs60style_s60.cpp @@ -579,7 +579,6 @@ QPixmap QS60StyleModeSpecifics::colorSkinnedGraphicsLX( const TAknsItemID skinId = m_partMap[stylepartIndex].skinID; TInt fallbackGraphicID = -1; - HBufC* iconFile = HBufC::NewLC( KMaxFileName ); fallbackInfo(stylepart, fallbackGraphicID); TAknsItemID colorGroup = KAknsIIDQsnIconColors; @@ -613,7 +612,7 @@ QPixmap QS60StyleModeSpecifics::colorSkinnedGraphicsLX( defaultColor); QPixmap result = fromFbsBitmap(icon, iconMask, flags, targetSize); - CleanupStack::PopAndDestroy(3); //icon, iconMask, iconFile + CleanupStack::PopAndDestroy(2); //icon, iconMask return result; } @@ -1541,7 +1540,7 @@ QVariant QS60StyleModeSpecifics::themeDefinition( //Animation definitions case QS60StyleEnums::TD_AnimationData: { - CAknsBmpAnimItemData *animationData; + CAknsBmpAnimItemData *animationData = 0; TAknsItemID animationSkinId = partSpecificThemeId(part); QList<QVariant> list; @@ -1557,9 +1556,6 @@ QVariant QS60StyleModeSpecifics::themeDefinition( QS60StyleEnums::AnimationMode playMode; switch(animationData->PlayMode()) { - case CBitmapAnimClientData::EPlay: - playMode = QS60StyleEnums::AM_PlayOnce; - break; case CBitmapAnimClientData::ECycle: playMode = QS60StyleEnums::AM_Looping; break; @@ -1567,6 +1563,7 @@ QVariant QS60StyleModeSpecifics::themeDefinition( playMode = QS60StyleEnums::AM_Bounce; break; default: + playMode = QS60StyleEnums::AM_PlayOnce; break; } list.append(QVariant((int)playMode)); |