Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
bvr-yr committed Mar 12, 2024
1 parent b5853bb commit dab8764
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/renderer/widgets/PasswordInputField.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -380,10 +380,7 @@ void CPasswordInputField::updateOuter() {
if (outerColor.animated) {
if (outerColor.stateNum != outerColor.invertNum ? !g_pHyprlock->m_bNumLock : g_pHyprlock->m_bNumLock || outerColor.stateCaps != g_pHyprlock->m_bCapsLock)
SOURCE = outerColor.main;
} else
SOURCE = outerColor.main;

outerColor.animated = false;
outerColor.stateNum = outerColor.invertNum ? !g_pHyprlock->m_bNumLock : g_pHyprlock->m_bNumLock;
outerColor.stateCaps = g_pHyprlock->m_bCapsLock;

Expand All @@ -399,15 +396,17 @@ void CPasswordInputField::updateOuter() {
else
TARGET = OUTER;
} else {
SOURCE = outerColor.check;
TARGET = outerColor.fail;

if (fade.animated || fade.a < 1.0) {
if (fade.animated || fade.a < 1.0)
TARGET = OUTER;
SOURCE = outerColor.fail;
}
}

if (!outerColor.animated)
SOURCE = outerColor.main;

outerColor.animated = false;

if (outerColor.main == TARGET)
return;

Expand Down

0 comments on commit dab8764

Please sign in to comment.