Skip to content

Commit

Permalink
animations: sync inactive/active border angles when using borderangle…
Browse files Browse the repository at this point in the history
… animations (#9401)
  • Loading branch information
PaideiaDilemma authored Feb 13, 2025
1 parent 1789405 commit 208f94f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/render/decorations/CHyprBorderDecoration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ void CHyprBorderDecoration::draw(PHLMONITOR pMonitor, float const& a) {
if (m_pWindow->m_fBorderAngleAnimationProgress->enabled()) {
grad.m_fAngle += m_pWindow->m_fBorderAngleAnimationProgress->value() * M_PI * 2;
grad.m_fAngle = normalizeAngleRad(grad.m_fAngle);

// When borderangle is animated, it is counterintuitive to fade between inactive/active gradient angles.
// Instead we sync the angles to avoid fading between them and additionally rotating the border angle.
if (ANIMATED)
m_pWindow->m_cRealBorderColorPrevious.m_fAngle = grad.m_fAngle;
}

int borderSize = m_pWindow->getRealBorderSize();
Expand Down

0 comments on commit 208f94f

Please sign in to comment.