From cae73cbd9d1779c6016ee0d1e83fed618ae293f9 Mon Sep 17 00:00:00 2001 From: Hugo Pereira Da Costa Date: Sat, 29 Aug 2015 18:48:58 +0200 Subject: [PATCH] readded proper gradient on active window titlebar --- kdecoration/breezedecoration.cpp | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/kdecoration/breezedecoration.cpp b/kdecoration/breezedecoration.cpp index 51b815fc..bc64eff4 100644 --- a/kdecoration/breezedecoration.cpp +++ b/kdecoration/breezedecoration.cpp @@ -456,16 +456,25 @@ namespace Breeze const auto c = client().data(); const QRect titleRect(QPoint(0, 0), QSize(size().width(), borderTop())); - // render a linear gradient on title area - const QColor titleBarColor( this->titleBarColor() ); - QLinearGradient gradient( 0, 0, 0, titleRect.height() ); - gradient.setColorAt(0.0, titleBarColor.lighter(100.0)); - gradient.setColorAt(0.8, titleBarColor); - painter->save(); - painter->setBrush(gradient); painter->setPen(Qt::NoPen); + // render a linear gradient on title area + if( c->isActive() ) + { + + const QColor titleBarColor( this->titleBarColor() ); + QLinearGradient gradient( 0, 0, 0, titleRect.height() ); + gradient.setColorAt(0.0, titleBarColor.lighter( 120 ) ); + gradient.setColorAt(0.8, titleBarColor); + painter->setBrush(gradient); + + } else { + + painter->setBrush( titleBarColor() ); + + } + if (isMaximized()) {