handling Qt::GlobalColor

This commit is contained in:
Uwe Rathmann 2017-11-09 19:59:32 +01:00
parent 3f979fa6af
commit 708c7e81f2

View File

@ -442,6 +442,11 @@ QSK_RGB_VALUES
return QColor::fromRgba( ( c1.rgb() & ColorMask ) | ( ( alpha & 0xffu ) << 24 ) );
}
inline QColor toTransparent( Qt::GlobalColor color, int alpha = 0 )
{
return toTransparent( QColor( color ), alpha );
}
inline QRgb toTransparent( QRgb rgb, int alpha = 0 )
{
return ( rgb & ColorMask ) | ( ( alpha & 0xffu ) << 24 );