Skip to content

Commit

Permalink
Implement shadow caching for roundBottomCornersWhenNoBorders
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmcauley committed May 20, 2023
1 parent 765e08f commit ba60c71
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions kdecoration/breezedecoration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ static QColor g_shadowColor = Qt::black;
static qreal g_cornerRadius = 3;
static qreal g_systemScaleFactor = 1;
static bool g_hasNoBorders = true;
static bool g_roundBottomCornersWhenNoBorders = false;
static int g_thinWindowOutlineStyle = 0;
static QColor g_thinWindowOutlineColorActive = Qt::black;
static QColor g_thinWindowOutlineColorInactive = Qt::black;
Expand Down Expand Up @@ -1281,6 +1282,7 @@ void Decoration::updateShadow(const bool force, const bool noCache, const bool i
if (force || g_shadowSizeEnum != m_internalSettings->shadowSize() || g_shadowStrength != m_internalSettings->shadowStrength()
|| g_shadowColor != m_internalSettings->shadowColor() || !(qAbs(g_cornerRadius - m_scaledCornerRadius) < 0.001)
|| !(qAbs(g_systemScaleFactor - m_systemScaleFactor) < 0.001) || g_hasNoBorders != hasNoBorders()
|| g_roundBottomCornersWhenNoBorders != m_internalSettings->roundBottomCornersWhenNoBorders()
|| g_thinWindowOutlineStyle != m_internalSettings->thinWindowOutlineStyle()
|| (c->isActive() ? g_thinWindowOutlineColorActive != m_thinWindowOutline : g_thinWindowOutlineColorInactive != m_thinWindowOutline)
|| g_thinWindowOutlineThickness != m_internalSettings->thinWindowOutlineThickness()) {
Expand All @@ -1293,6 +1295,7 @@ void Decoration::updateShadow(const bool force, const bool noCache, const bool i
g_cornerRadius = m_scaledCornerRadius;
g_systemScaleFactor = m_systemScaleFactor;
g_hasNoBorders = hasNoBorders();
g_roundBottomCornersWhenNoBorders = m_internalSettings->roundBottomCornersWhenNoBorders();
g_thinWindowOutlineStyle = m_internalSettings->thinWindowOutlineStyle();
c->isActive() ? g_thinWindowOutlineColorActive = m_thinWindowOutline : g_thinWindowOutlineColorInactive = m_thinWindowOutline;
g_thinWindowOutlineThickness = m_internalSettings->thinWindowOutlineThickness();
Expand Down

0 comments on commit ba60c71

Please sign in to comment.