diff options
Diffstat (limited to 'src/gui/image/qpixmap_s60.cpp')
-rw-r--r-- | src/gui/image/qpixmap_s60.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gui/image/qpixmap_s60.cpp b/src/gui/image/qpixmap_s60.cpp index 493e440..666e557 100644 --- a/src/gui/image/qpixmap_s60.cpp +++ b/src/gui/image/qpixmap_s60.cpp @@ -178,7 +178,12 @@ CFbsBitmap *QPixmap::toSymbianCFbsBitmap() const return 0; } - const QImage converted = img.convertToFormat(destFormat); + QImage converted = img.convertToFormat(destFormat); + + //Symbian thinks set pixels are white/transparent, Qt thinks they are foreground/solid + //So invert mono bitmaps so that masks work correctly. + if (mode == EGray2) + converted.invertPixels(); bitmap->LockHeap(); const uchar *sptr = converted.bits(); @@ -220,6 +225,9 @@ QPixmap QPixmap::fromSymbianCFbsBitmap(CFbsBitmap *bitmap) image.setNumColors(2); image.setColor(0, QColor(Qt::color0).rgba()); image.setColor(1, QColor(Qt::color1).rgba()); + //Symbian thinks set pixels are white/transparent, Qt thinks they are foreground/solid + //So invert mono bitmaps so that masks work correctly. + image.invertPixels(); } else if (displayMode == EGray256) { for (int i=0; i < 256; ++i) image.setColor(i, qRgb(i, i, i)); |