Skip to content

Commit

Permalink
animation: small gradient fail transition fixup (#648)
Browse files Browse the repository at this point in the history
  • Loading branch information
PaideiaDilemma authored Jan 15, 2025
1 parent 4f96437 commit 02639c2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/core/AnimationManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
6 changes: 4 additions & 2 deletions src/renderer/widgets/PasswordInputField.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 02639c2

Please sign in to comment.