summaryrefslogtreecommitdiff
path: root/src/render
diff options
context:
space:
mode:
authorMaximilian Seidler <78690852+PaideiaDilemma@users.noreply.github.com>2025-02-13 11:08:03 +0000
committerGitHub <noreply@github.com>2025-02-13 11:08:03 +0000
commit208f94fe12a30474d6805262524da3da492a0990 (patch)
treef80254b0c201cd598a41032dff0dccb01e3205f1 /src/render
parent17894051634716ab80c6502abdbb90ae2bc68f25 (diff)
animations: sync inactive/active border angles when using borderangle animations (#9401)
Diffstat (limited to 'src/render')
-rw-r--r--src/render/decorations/CHyprBorderDecoration.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/render/decorations/CHyprBorderDecoration.cpp b/src/render/decorations/CHyprBorderDecoration.cpp
index 5f2fdbda..0df3acde 100644
--- a/src/render/decorations/CHyprBorderDecoration.cpp
+++ b/src/render/decorations/CHyprBorderDecoration.cpp
@@ -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();