mirror of
https://github.com/hyprwm/hyprlock.git
synced 2024-11-16 23:05:58 +01:00
input-field: also fade in when checkWaiting is true (#265)
This commit is contained in:
parent
a50db6d56d
commit
1bfe32e7fa
1 changed files with 6 additions and 4 deletions
|
@ -94,15 +94,17 @@ void CPasswordInputField::updateFade() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (passwordLength > 0 && fade.allowFadeOut)
|
const bool INPUTUSED = passwordLength > 0 || checkWaiting;
|
||||||
|
|
||||||
|
if (INPUTUSED && fade.allowFadeOut)
|
||||||
fade.allowFadeOut = false;
|
fade.allowFadeOut = false;
|
||||||
|
|
||||||
if (passwordLength > 0 && fade.fadeOutTimer.get()) {
|
if (INPUTUSED && fade.fadeOutTimer.get()) {
|
||||||
fade.fadeOutTimer->cancel();
|
fade.fadeOutTimer->cancel();
|
||||||
fade.fadeOutTimer.reset();
|
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) {
|
if (fade.allowFadeOut || fadeTimeoutMs == 0) {
|
||||||
fade.a = 1.0;
|
fade.a = 1.0;
|
||||||
fade.animated = true;
|
fade.animated = true;
|
||||||
|
@ -113,7 +115,7 @@ void CPasswordInputField::updateFade() {
|
||||||
fade.fadeOutTimer = g_pHyprlock->addTimer(std::chrono::milliseconds(fadeTimeoutMs), fadeOutCallback, this);
|
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.a = 0.0;
|
||||||
fade.animated = true;
|
fade.animated = true;
|
||||||
fade.appearing = true;
|
fade.appearing = true;
|
||||||
|
|
Loading…
Reference in a new issue