diff options
-rw-r--r-- | src/gui/styles/qs60style_s60.cpp | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/src/gui/styles/qs60style_s60.cpp b/src/gui/styles/qs60style_s60.cpp index 33619d6..489ad09 100644 --- a/src/gui/styles/qs60style_s60.cpp +++ b/src/gui/styles/qs60style_s60.cpp @@ -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,9 +971,14 @@ 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(); @@ -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) || |