properly deal with invalid colors when calculating cache keys.
using color.rgba() for an invalid color corresponds to solid black, which in turns conflicts with the cache value for such color. We use "transparent black" instead. CCBUG: 304868
This commit is contained in:
parent
4f3b3ee154
commit
a93f71ab57
1 changed files with 3 additions and 3 deletions
|
@ -55,7 +55,7 @@ namespace Oxygen
|
|||
|
||||
Oxygen::Cache<QPixmap>::Value* cache( _windecoButtonCache.get( color ) );
|
||||
|
||||
const quint64 key( ( quint64( glow.rgba() ) << 32 ) | (sunken << 23 ) | size );
|
||||
const quint64 key( ( colorKey(glow) << 32 ) | (sunken << 23 ) | size );
|
||||
QPixmap *pixmap = cache->object( key );
|
||||
|
||||
if( !pixmap )
|
||||
|
@ -151,7 +151,7 @@ namespace Oxygen
|
|||
const QColor& DecoHelper::inactiveTitleBarTextColor( const QPalette& palette )
|
||||
{
|
||||
|
||||
const quint32 key( palette.color(QPalette::Active, QPalette::Window).rgba() );
|
||||
const quint32 key( colorKey( palette.color(QPalette::Active, QPalette::Window) ) );
|
||||
QColor* out( _titleBarTextColorCache.object( key ) );
|
||||
if( !out )
|
||||
{
|
||||
|
@ -173,7 +173,7 @@ namespace Oxygen
|
|||
const QColor& DecoHelper::inactiveButtonTextColor( const QPalette& palette )
|
||||
{
|
||||
|
||||
const quint32 key( palette.color(QPalette::Active, QPalette::Window).rgba() );
|
||||
const quint32 key( colorKey( palette.color(QPalette::Active, QPalette::Window) ) );
|
||||
QColor* out( _buttonTextColorCache.object( key ) );
|
||||
if( !out )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue