Skip to content

Commit

Permalink
input-field: also fade in when checkWaiting is true (#265)
Browse files Browse the repository at this point in the history
  • Loading branch information
PaideiaDilemma committed Apr 9, 2024
1 parent a50db6d commit 1bfe32e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/renderer/widgets/PasswordInputField.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,17 @@ void CPasswordInputField::updateFade() {
return;
}

if (passwordLength > 0 && fade.allowFadeOut)
const bool INPUTUSED = passwordLength > 0 || checkWaiting;

if (INPUTUSED && fade.allowFadeOut)
fade.allowFadeOut = false;

if (passwordLength > 0 && fade.fadeOutTimer.get()) {
if (INPUTUSED && fade.fadeOutTimer.get()) {
fade.fadeOutTimer->cancel();
fade.fadeOutTimer.reset();
}

if (passwordLength == 0 && fade.a != 0.0 && (!fade.animated || fade.appearing)) {
if (!INPUTUSED && fade.a != 0.0 && (!fade.animated || fade.appearing)) {
if (fade.allowFadeOut || fadeTimeoutMs == 0) {
fade.a = 1.0;
fade.animated = true;
Expand All @@ -113,7 +115,7 @@ void CPasswordInputField::updateFade() {
fade.fadeOutTimer = g_pHyprlock->addTimer(std::chrono::milliseconds(fadeTimeoutMs), fadeOutCallback, this);
}

if (passwordLength > 0 && fade.a != 1.0 && (!fade.animated || !fade.appearing)) {
if (INPUTUSED && fade.a != 1.0 && (!fade.animated || !fade.appearing)) {
fade.a = 0.0;
fade.animated = true;
fade.appearing = true;
Expand Down

0 comments on commit 1bfe32e

Please sign in to comment.