buggy implementation of QskRgbValue::toTransparent fixed

This commit is contained in:
Uwe Rathmann 2017-11-02 18:49:51 +01:00
parent b1a137100a
commit f2f2724ea5

View File

@ -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 );
}
}