From f2f2724ea544cec13d1b9f215661e044efdaa8bf Mon Sep 17 00:00:00 2001 From: Uwe Rathmann Date: Thu, 2 Nov 2017 18:49:51 +0100 Subject: [PATCH] buggy implementation of QskRgbValue::toTransparent fixed --- src/controls/QskRgbValue.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controls/QskRgbValue.h b/src/controls/QskRgbValue.h index df768ebf..f12b2726 100644 --- a/src/controls/QskRgbValue.h +++ b/src/controls/QskRgbValue.h @@ -439,12 +439,12 @@ QSK_RGB_VALUES inline QColor toTransparent( const QColor& c1, int alpha = 0 ) { - return QColor::fromRgba( ( c1.rgb() & ColorMask ) | ( alpha & AlphaMask ) ); + return QColor::fromRgba( ( c1.rgb() & ColorMask ) | ( ( alpha & 0xffu ) << 24 ) ); } inline QRgb toTransparent( QRgb rgb, int alpha = 0 ) { - return ( rgb & ColorMask ) | ( alpha & AlphaMask ); + return ( rgb & ColorMask ) | ( ( alpha & 0xffu ) << 24 ); } }