mirror of
https://github.com/hyprwm/hyprlock.git
synced 2026-05-20 03:38:06 +02:00
input-field: fix placeholder not updating correctly
Bug introduced in #959, reference made the config text be overwritten
This commit is contained in:
parent
78c1d26da7
commit
20d5b7ca6d
1 changed files with 6 additions and 7 deletions
|
|
@ -343,16 +343,15 @@ void CPasswordInputField::updatePlaceholder() {
|
|||
if (displayFail && placeholder.failedAttempts == g_pAuth->getFailedAttempts())
|
||||
return;
|
||||
|
||||
std::string& templateText = configPlaceholderText;
|
||||
std::string newText = "";
|
||||
|
||||
if (displayFail) {
|
||||
templateText = configFailText;
|
||||
newText = formatString(configFailText).formatted;
|
||||
placeholder.failedAttempts = g_pAuth->getFailedAttempts();
|
||||
} else if (checkWaiting && !configCheckText.empty()) {
|
||||
templateText = configCheckText;
|
||||
}
|
||||
|
||||
const std::string newText = formatString(templateText).formatted;
|
||||
} else if (checkWaiting && !configCheckText.empty())
|
||||
newText = formatString(configCheckText).formatted;
|
||||
else
|
||||
newText = formatString(configPlaceholderText).formatted;
|
||||
|
||||
// if the text is unchanged we don't need to do anything, unless we are swapping font color
|
||||
const auto ALLOWCOLORSWAP = outThick == 0 && colorConfig.swapFont;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue