From ecca4d0d71ed79387f2ebd3371a64b090d8345ae Mon Sep 17 00:00:00 2001 From: Salva Ardid Date: Wed, 31 Aug 2022 16:10:24 +0200 Subject: [PATCH] Fix #108 --- breezedecoration.cpp | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/breezedecoration.cpp b/breezedecoration.cpp index 755eee8..168cb38 100644 --- a/breezedecoration.cpp +++ b/breezedecoration.cpp @@ -945,20 +945,22 @@ namespace Breeze painter->setBrush( titleBarColor ); auto s = settings(); - if( !s->isAlphaChannelSupported() ) - painter->drawRect(titleRect); - else if ( !hasBorders() ) { - painter->setClipRect(titleRect, Qt::IntersectClip); - // the rect is made a little bit larger to be able to clip away the rounded corners at the bottom and sides - painter->drawRoundedRect(titleRect.adjusted( - isLeftEdge() ? -m_internalSettings->cornerRadius():0, - isTopEdge() ? -m_internalSettings->cornerRadius():0, - isRightEdge() ? m_internalSettings->cornerRadius():0, - m_internalSettings->cornerRadius()), - m_internalSettings->cornerRadius(), m_internalSettings->cornerRadius()); - } - else - painter->drawRoundedRect(titleRect, m_internalSettings->cornerRadius(), m_internalSettings->cornerRadius()); +// // The following conditional creates a color dissonance when opacity is active between the titlebar and the borders. +// // I don't think it's needed anyway since version 1.1.0, but keeping this comment here for the case, this needs to be reverted. +// if( !s->isAlphaChannelSupported() ) +// painter->drawRect(titleRect); +// else if ( !hasBorders() ) { +// painter->setClipRect(titleRect, Qt::IntersectClip); +// // the rect is made a little bit larger to be able to clip away the rounded corners at the bottom and sides +// painter->drawRoundedRect(titleRect.adjusted( +// isLeftEdge() ? -m_internalSettings->cornerRadius():0, +// isTopEdge() ? -m_internalSettings->cornerRadius():0, +// isRightEdge() ? m_internalSettings->cornerRadius():0, +// m_internalSettings->cornerRadius()), +// m_internalSettings->cornerRadius(), m_internalSettings->cornerRadius()); +// } +// else +// painter->drawRoundedRect(titleRect, m_internalSettings->cornerRadius(), m_internalSettings->cornerRadius()); if( !c->isShaded() && !hideTitleBar() && outlineColor.isValid() ) {