mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-07-25 17:21:54 -07:00
animations: sync inactive/active border angles when using borderangle animations (#9401)
This commit is contained in:
committed by
GitHub
parent
1789405163
commit
208f94fe12
@@ -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();
|
||||
|
Reference in New Issue
Block a user