diff options
Diffstat (limited to 'src/kernel/qcolor_x11.cpp')
-rw-r--r-- | src/kernel/qcolor_x11.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/kernel/qcolor_x11.cpp b/src/kernel/qcolor_x11.cpp index eeaee5e..dbd039e 100644 --- a/src/kernel/qcolor_x11.cpp +++ b/src/kernel/qcolor_x11.cpp @@ -407,8 +407,14 @@ uint QColor::alloc( int screen ) b = sd->blue_shift > 0 ? b << sd->blue_shift : b >> -sd->blue_shift; pix = (b & sd->blue_mask) | (g & sd->green_mask) | (r & sd->red_mask) | ~(sd->blue_mask | sd->green_mask | sd->red_mask); - if ( screen == QPaintDevice::x11AppScreen() ) + if (QPaintDevice::x11AppDepth(screen) == 32) { + int a = qAlpha(d.argb); + pix = pix & 0x00ffffff; + pix = pix | (a << 24); + } + if ( screen == QPaintDevice::x11AppScreen() ) { d.d32.pix = pix; + } return pix; } QColorData *c = sd->colorDict->find( (long)(d.argb) ); |