mirror of
https://github.com/hyprwm/hyprlock.git
synced 2025-02-04 00:39:48 +01:00
input-field: use IWidget::formatString for placeholder text (#603)
This commit is contained in:
parent
bf37645daa
commit
90bc9764f1
1 changed files with 4 additions and 5 deletions
|
@ -347,12 +347,11 @@ void CPasswordInputField::updatePlaceholder() {
|
|||
|
||||
if (displayFail) {
|
||||
g_pHyprlock->addTimer(std::chrono::milliseconds(configFailTimeoutMs), failTimeoutCallback, nullptr);
|
||||
placeholder.currentText = configFailText;
|
||||
replaceInString(placeholder.currentText, "$FAIL", AUTHFEEDBACK);
|
||||
replaceInString(placeholder.currentText, "$ATTEMPTS", std::to_string(placeholder.failedAttempts));
|
||||
const auto FORMATTEDFAIL = formatString(configFailText).formatted;
|
||||
placeholder.currentText = FORMATTEDFAIL;
|
||||
} else {
|
||||
placeholder.currentText = configPlaceholderText;
|
||||
replaceInString(placeholder.currentText, "$PROMPT", AUTHFEEDBACK);
|
||||
const auto FORMATTEDPLACEHOLDER = formatString(configPlaceholderText).formatted;
|
||||
placeholder.currentText = FORMATTEDPLACEHOLDER;
|
||||
}
|
||||
|
||||
placeholder.resourceID =
|
||||
|
|
Loading…
Reference in a new issue