[Libreoffice-commits] core.git: vcl/inc

Katarina Behrens Katarina.Behrens at cib.de
Mon Jun 4 14:52:02 UTC 2018


 vcl/inc/qt5/Qt5Tools.hxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 8db52a95368a256e47f6b7229adb9b8d2a47453f
Author: Katarina Behrens <Katarina.Behrens at cib.de>
Date:   Mon Jun 4 16:45:58 2018 +0200

    Qt's interpretation of transparency is different from vcl's one
    
    thanks Sergei Reznikov for pointing this out
    
    Change-Id: Ib07d144bb50b178ee7b36f2c7b2eaede27ed10bc
    (cherry picked from commit e56c81cc996747e3768cf171d0d6e94753b7d2af)

diff --git a/vcl/inc/qt5/Qt5Tools.hxx b/vcl/inc/qt5/Qt5Tools.hxx
index a714f19e8a87..f075468ca3d3 100644
--- a/vcl/inc/qt5/Qt5Tools.hxx
+++ b/vcl/inc/qt5/Qt5Tools.hxx
@@ -58,7 +58,8 @@ inline Size toSize(const QSize& rSize) { return Size(rSize.width(), rSize.height
 
 inline QColor toQColor(const Color& rColor)
 {
-    return QColor(rColor.GetRed(), rColor.GetGreen(), rColor.GetBlue(), rColor.GetTransparency());
+    return QColor(rColor.GetRed(), rColor.GetGreen(), rColor.GetBlue(),
+                  255 - rColor.GetTransparency());
 }
 
 static constexpr QImage::Format Qt5_DefaultFormat32 = QImage::Format_ARGB32;


More information about the Libreoffice-commits mailing list