mirror of
https://github.com/hyprwm/hyprlock.git
synced 2024-12-22 05:19:48 +01:00
input-field: fix missing fail_text
when placeholder_text
is empty (#192)
* input-field: fix missing fail text when placeholder is empty * comments
This commit is contained in:
parent
1c92c6109c
commit
56e7bc1e51
1 changed files with 4 additions and 1 deletions
|
@ -47,7 +47,10 @@ CPasswordInputField::CPasswordInputField(const Vector2D& viewport_, const std::u
|
|||
g_pHyprlock->m_bNumLock = outerColor.invertNum;
|
||||
|
||||
std::string placeholderText = std::any_cast<Hyprlang::STRING>(props.at("placeholder_text"));
|
||||
if (!placeholderText.empty()) {
|
||||
|
||||
// Render placeholder if either placeholder_text or fail_text are non-empty
|
||||
// as placeholder must be rendered to show fail_text
|
||||
if (!placeholderText.empty() || !configFailText.empty()) {
|
||||
placeholder.resourceID = "placeholder:" + std::to_string((uintptr_t)this);
|
||||
CAsyncResourceGatherer::SPreloadRequest request;
|
||||
request.id = placeholder.resourceID;
|
||||
|
|
Loading…
Reference in a new issue