summaryrefslogtreecommitdiffstats
path: root/src/gui/styles/qs60style_s60.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/styles/qs60style_s60.cpp')
-rw-r--r--src/gui/styles/qs60style_s60.cpp28
1 files changed, 23 insertions, 5 deletions
diff --git a/src/gui/styles/qs60style_s60.cpp b/src/gui/styles/qs60style_s60.cpp
index 33619d6..cfb10fa 100644
--- a/src/gui/styles/qs60style_s60.cpp
+++ b/src/gui/styles/qs60style_s60.cpp
@@ -110,7 +110,7 @@ typedef struct {
TDrawType drawType; // Determines which native drawing routine is used to draw this item.
int supportInfo; // Defines the S60 versions that use the default graphics.
// These two, define new graphics that are used in releases other than partMapEntry.supportInfo defined releases.
- // In general, these are given in numeric form to allow style compilation in earlier
+ // In general, these are given in numeric form to allow style compilation in earlier
// native releases that do not contain the new graphics.
int newMajorSkinId;
int newMinorSkinId;
@@ -929,6 +929,16 @@ QPixmap QS60StyleModeSpecifics::createSkinnedGraphicsLX(
fallbackGraphicID ,
fallbackGraphicsMaskID);
+ // If drawing fails, re-try without a mask.
+ if (!icon) {
+ AknsUtils::CreateIconL(
+ skinInstance,
+ skinId,
+ icon,
+ (fallbackGraphicID != KErrNotFound ? AknIconUtils::AvkonIconFileName() : KNullDesC),
+ fallbackGraphicID);
+ }
+
result = fromFbsBitmap(icon, iconMask, flags, targetSize);
delete icon;
delete iconMask;
@@ -961,17 +971,22 @@ QPixmap QS60StyleModeSpecifics::createSkinnedGraphicsLX(
targetSize,
drawParam);
- if (drawn)
+ if (drawn) {
result = fromFbsBitmap(background, NULL, flags, targetSize);
- // if drawing fails in skin server, just ignore the background (probably OOM case)
+ } else {
+ // if drawing fails in skin server, draw background as white
+ QPixmap defaultBg = QPixmap(targetSize.iWidth, targetSize.iHeight);
+ defaultBg.fill(Qt::white);
+ result = defaultBg;
+ }
CleanupStack::PopAndDestroy(4, background); //background, dev, gc, bgContext
// QS60WindowSurface::lockBitmapHeap();
break;
}
case EDrawAnimation: {
- CFbsBitmap* animationFrame;
- CFbsBitmap* frameMask;
+ CFbsBitmap* animationFrame = 0;
+ CFbsBitmap* frameMask = 0;
CAknBitmapAnimation* aknAnimation = 0;
TBool constructedFromTheme = ETrue;
@@ -1225,6 +1240,9 @@ TRect QS60StyleModeSpecifics::innerRectFromElement(QS60StylePrivate::SkinFrameEl
bool QS60StyleModeSpecifics::checkSupport(const int supportedRelease)
{
+ if (supportedRelease == ES60_All)
+ return true;
+
const QSysInfo::S60Version currentRelease = QSysInfo::s60Version();
return ( (currentRelease == QSysInfo::SV_S60_3_1 && supportedRelease & ES60_3_1) ||
(currentRelease == QSysInfo::SV_S60_3_2 && supportedRelease & ES60_3_2) ||