mirror of
https://github.com/hyprwm/hyprlock.git
synced 2025-05-12 21:30:37 +01:00
animations: linear bezier for gradient, warp behavior
This commit is contained in:
parent
c4b2175822
commit
235bebdf1f
3 changed files with 6 additions and 5 deletions
|
@ -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();
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue