summaryrefslogtreecommitdiffstats
path: root/src/kernel/qpainter_x11.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2013-05-03 15:02:25 -0500
committerTimothy Pearson <[email protected]>2013-05-03 15:02:25 -0500
commit2a85fcbb5cafc25a750ce548123c8e7422793b3c (patch)
tree00606f37c78ac13f0a94f8311ad4c8aa6e5560cc /src/kernel/qpainter_x11.cpp
parent4e770dc8156d0fdce5c9c6e0c71935fe4d18648e (diff)
downloadqt3-2a85fcbb5cafc25a750ce548123c8e7422793b3c.tar.gz
qt3-2a85fcbb5cafc25a750ce548123c8e7422793b3c.zip
Fix ARGB mode stippled focus rectangle showing underlying window contents
Fix TQColor not processing alpha channel in ARGB mode
Diffstat (limited to 'src/kernel/qpainter_x11.cpp')
-rw-r--r--src/kernel/qpainter_x11.cpp19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/kernel/qpainter_x11.cpp b/src/kernel/qpainter_x11.cpp
index 2aea6bc..b939848 100644
--- a/src/kernel/qpainter_x11.cpp
+++ b/src/kernel/qpainter_x11.cpp
@@ -1856,16 +1856,24 @@ void QPainter::drawWinFocusRect( int x, int y, int w, int h,
RasterOp old_rop = (RasterOp)rop;
if ( xorPaint ) {
- if ( QColor::numBitPlanes() <= 8 )
+ if ( QColor::numBitPlanes() <= 8 ) {
setPen( QPen(color1, 0, Qt::FineDotLine) );
- else
+ }
+ else if ( QColor::numBitPlanes() <= 8 ) {
setPen( QPen(white, 0, Qt::FineDotLine) );
+ }
+ else {
+ setPen( QPen(QColor(qRgba(255,255,255,0)), 0, Qt::FineDotLine) );
+ }
setRasterOp( XorROP );
- } else {
- if ( qGray( bgColor.rgb() ) < 128 )
+ }
+ else {
+ if ( qGray( bgColor.rgb() ) < 128 ) {
setPen( QPen(white, 0, Qt::FineDotLine) );
- else
+ }
+ else {
setPen( QPen(black, 0, Qt::FineDotLine) );
+ }
}
if ( testf(ExtDev|VxF|WxF) ) {
@@ -1893,6 +1901,7 @@ void QPainter::drawWinFocusRect( int x, int y, int w, int h,
XSetLineAttributes( dpy, gc, 1, LineOnOffDash, CapButt, JoinMiter );
XDrawRectangle( dpy, hd, gc, x, y, w-1, h-1 );
+
XSetLineAttributes( dpy, gc, 0, LineSolid, CapButt, JoinMiter );
setRasterOp( old_rop );
setPen( old_pen );