animations: linear bezier for gradient, warp behavior

This commit is contained in:
Maximilian Seidler 2025-02-19 09:53:26 +01:00
parent c4b2175822
commit 235bebdf1f
3 changed files with 6 additions and 5 deletions

View file

@ -346,6 +346,7 @@ void CConfigManager::init() {
// set config for root node
m_AnimationTree.setConfigForNode("global", 1, 8.f, "default");
m_AnimationTree.setConfigForNode("inputFieldColors", 1, 8.f, "linear");
m_config.commence();

View file

@ -4,13 +4,13 @@
#include "../config/ConfigManager.hpp"
CHyprlockAnimationManager::CHyprlockAnimationManager() {
;
addBezierWithName("linear", {0, 0}, {1, 1});
}
template <Animable VarType>
void updateVariable(CAnimatedVariable<VarType>& av, const float POINTY, bool warp = false) {
if (warp || !av.enabled() || av.value() == av.goal()) {
av.warp();
av.warp(true, false);
return;
}
@ -20,7 +20,7 @@ void updateVariable(CAnimatedVariable<VarType>& av, const float POINTY, bool war
void updateColorVariable(CAnimatedVariable<CHyprColor>& av, const float POINTY, bool warp = false) {
if (warp || !av.enabled() || av.value() == av.goal()) {
av.warp();
av.warp(true, false);
return;
}
@ -44,7 +44,7 @@ void updateColorVariable(CAnimatedVariable<CHyprColor>& av, const float POINTY,
void updateGradientVariable(CAnimatedVariable<CGradientValueData>& av, const float POINTY, bool warp = false) {
if (warp || av.value() == av.goal()) {
av.warp();
av.warp(true, false);
return;
}

View file

@ -426,7 +426,7 @@ void CPasswordInputField::updateColors() {
CHyprColor innerTarget = colorConfig.inner;
CHyprColor fontTarget = (displayFail) ? colorConfig.fail->m_vColors.front() : colorConfig.font;
if (checkWaiting || displayFail || g_pHyprlock->m_bCapsLock || (NUMLOCK && !colorConfig.num->m_bIsFallback)) {
if (targetGrad) {
if (BORDERLESS && colorConfig.swapFont) {
fontTarget = targetGrad->m_vColors.front();
} else if (BORDERLESS && !colorConfig.swapFont) {