animation: small gradient fail transition fixup (#648)

This commit is contained in:
Maximilian Seidler 2025-01-15 15:09:11 +00:00 committed by GitHub
parent 4f964371cc
commit 02639c2759
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 3 deletions

View file

@ -66,13 +66,14 @@ void updateGradientVariable(CAnimatedVariable<CGradientValueData>& av, const flo
};
av.value().m_vColors[i] = {lerped, lerp(sourceCol.a, targetCol.a, POINTY)};
av.value().updateColorsOk();
}
if (av.begun().m_fAngle != av.goal().m_fAngle) {
const float DELTA = av.goal().m_fAngle - av.begun().m_fAngle;
av.value().m_fAngle = av.begun().m_fAngle + DELTA * POINTY;
}
av.value().updateColorsOk();
}
void CHyprlockAnimationManager::tick() {

View file

@ -288,8 +288,10 @@ bool CPasswordInputField::draw(const SRenderData& data) {
}
static void failTimeoutCallback(std::shared_ptr<CTimer> self, void* data) {
g_pAuth->m_bDisplayFailText = false;
g_pHyprlock->renderAllOutputs();
if (g_pAuth->m_bDisplayFailText) {
g_pAuth->m_bDisplayFailText = false;
g_pHyprlock->renderAllOutputs();
}
}
void CPasswordInputField::updatePlaceholder() {