From: Jinhyung Jo Date: Mon, 19 Sep 2016 11:22:20 +0000 (+0900) Subject: display: fix transparency bug X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.2~26^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=469e1487bf96f72eb4d493b207c1d0751e513e61;p=sdk%2Femulator%2Fqemu.git display: fix transparency bug If the alpha value of the color less than 1.0, there is a issue that the desktop background is blended on the offscreen mode. So fixed it. Change-Id: Ic5c80aa7274a8ce6e9b433dc87e2581b0761619c Signed-off-by: Jinhyung Jo --- diff --git a/tizen/src/ui/displayswwidget.cpp b/tizen/src/ui/displayswwidget.cpp index 9ca59a673f..97c968ee32 100644 --- a/tizen/src/ui/displayswwidget.cpp +++ b/tizen/src/ui/displayswwidget.cpp @@ -40,11 +40,11 @@ DisplaySWWidget::DisplaySWWidget(QWidget *parent, DisplayType *displayForm, QSize resolution, qreal scaleFactor) : QLabel(parent), DisplayBase(displayForm, resolution, scaleFactor, this) { - /* fill the screen with black surface */ + /* fill the screen with black(with full alpha) surface */ QPixmap initImage( displayForm->getRect().width() * scaleFactor, displayForm->getRect().height() * scaleFactor); - initImage.fill(Qt::black); + initImage.fill(QColor(0, 0, 0, 255)); setPixmap(initImage); /* to be enable to drop events */ setAcceptDrops(true); diff --git a/tizen/src/ui/qt5_supplement.cpp b/tizen/src/ui/qt5_supplement.cpp index 016a2ec98c..d87d2d3df2 100644 --- a/tizen/src/ui/qt5_supplement.cpp +++ b/tizen/src/ui/qt5_supplement.cpp @@ -513,10 +513,10 @@ void qt5_prepare(void) void qt5_update_internal(void *data, int width, int height) { - QImage image((uchar *)data, width, height, QImage::Format_RGB32); + QImage image((uchar *)data, width, height, QImage::Format_ARGB32); - mainwindow->getScreenWidget()->setPixmap( - QPixmap::fromImage(image.transformed( + mainwindow->getScreenWidget()->setPixmap(QPixmap::fromImage( + image.convertToFormat(QImage::Format_RGB32).transformed( mainwindow->getDisplayMatrix(), Qt::SmoothTransformation))); }