diff --git a/effects/presentwindows.cpp b/effects/presentwindows.cpp index d011c89307..a0c5c7f1f8 100644 --- a/effects/presentwindows.cpp +++ b/effects/presentwindows.cpp @@ -135,7 +135,7 @@ void PresentWindowsEffect::paintScreen( int mask, QRegion region, ScreenPaintDat glEnable( GL_BLEND ); glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); // First render the frame - QColor color = QPalette().color( QPalette::Highlight ); + QColor color = QPalette().color( QPalette::Active, QPalette::Highlight ); glColor4f( color.redF(), color.greenF(), color.blueF(), 0.75f ); renderRoundBoxWithEdge( filterFrameRect ); // And then the text on top of it @@ -823,7 +823,7 @@ void PresentWindowsEffect::updateFilterTexture() // Paint the filter text to it QPainter p( &im ); p.setFont( font ); - p.setPen( QPalette().color( QPalette::HighlightedText ) ); + p.setPen( QPalette().color( QPalette::Active, QPalette::HighlightedText ) ); p.drawText( rect, Qt::AlignCenter, translatedString ); p.end(); // Create GL texture diff --git a/popupinfo.cpp b/popupinfo.cpp index cf8f9fd71c..69d3232837 100644 --- a/popupinfo.cpp +++ b/popupinfo.cpp @@ -85,6 +85,7 @@ void PopupInfo::paintEvent( QPaintEvent* ) QStyleOptionFrame *so = new QStyleOptionFrame; so->rect = QRect( 0, 0, width(), height() ); so->palette = palette(); + so->palette.setCurrentColorGroup( QPalette::Active ); so->state = QStyle::State_None; style()->drawPrimitive( QStyle::PE_Frame, so, &p ); paintContents(); @@ -100,7 +101,7 @@ void PopupInfo::paintContents() QPainter p( this ); QRect r( 6, 6, width()-12, height()-12 ); - p.fillRect( r, palette().brush( QPalette::Background ) ); + p.fillRect( r, palette().brush( QPalette::Active, QPalette::Background ) ); /* p.setPen(Qt::white); diff --git a/tabbox.cpp b/tabbox.cpp index e637aa33cb..cd5d7f1896 100644 --- a/tabbox.cpp +++ b/tabbox.cpp @@ -455,7 +455,7 @@ void TabBox::paintEvent( QPaintEvent* e ) { // draw highlight background if ( (*it) == currentClient() ) - p.fillRect(x, y, r.width(), lineHeight, palette().brush( QPalette::Highlight )); + p.fillRect(x, y, r.width(), lineHeight, palette().brush( QPalette::Active, QPalette::Highlight )); // draw icon QPixmap icon; @@ -492,11 +492,11 @@ void TabBox::paintEvent( QPaintEvent* e ) // draw text if ( (*it) == currentClient() ) - p.setPen(palette().color( QPalette::HighlightedText )); + p.setPen(palette().color( QPalette::Active, QPalette::HighlightedText )); else if( (*it)->isMinimized()) { - QColor c1 = palette().color( QPalette::Text ); - QColor c2 = palette().color( QPalette::Background ); + QColor c1 = palette().color( QPalette::Active, QPalette::Text ); + QColor c2 = palette().color( QPalette::Active, QPalette::Background ); // from kicker's TaskContainer::blendColors() int r1, g1, b1; int r2, g2, b2; @@ -511,7 +511,7 @@ void TabBox::paintEvent( QPaintEvent* e ) p.setPen(QColor( r1, g1, b1 )); } else - p.setPen(palette().color( QPalette::Text )); + p.setPen(palette().color( QPalette::Active, QPalette::Text )); p.drawText(x+5 + iconWidth + 8, y, r.width() - 5 - iconWidth - 8, lineHeight, Qt::AlignLeft | Qt::AlignVCenter | Qt::TextSingleLine, s); @@ -546,13 +546,13 @@ void TabBox::paintEvent( QPaintEvent* e ) { // draw highlight background if ( it == desk ) // current desktop - p.fillRect(x, y, r.width(), lineHeight, palette().brush( QPalette::Highlight )); + p.fillRect(x, y, r.width(), lineHeight, palette().brush( QPalette::Active, QPalette::Highlight )); p.save(); // draw "icon" (here: number of desktop) - p.fillRect(x+5, y+2, iconWidth, iconHeight, palette().brush( QPalette::Base )); - p.setPen(palette().color( QPalette::Text )); + p.fillRect(x+5, y+2, iconWidth, iconHeight, palette().brush( QPalette::Active, QPalette::Base )); + p.setPen(palette().color( QPalette::Active, QPalette::Text )); p.drawRect(x+5, y+2, iconWidth, iconHeight); // draw desktop-number @@ -564,9 +564,9 @@ void TabBox::paintEvent( QPaintEvent* e ) // draw desktop name text if ( it == desk ) - p.setPen(palette().color( QPalette::HighlightedText )); + p.setPen(palette().color( QPalette::Active, QPalette::HighlightedText )); else - p.setPen(palette().color( QPalette::Text )); + p.setPen(palette().color( QPalette::Active, QPalette::Text )); p.drawText(x+5 + iconWidth + 8, y, r.width() - 5 - iconWidth - 8, lineHeight, Qt::AlignLeft | Qt::AlignVCenter | Qt::TextSingleLine,