From 36743940f1d54fab63eb26edd4851b099e1bc9ec Mon Sep 17 00:00:00 2001 From: Felix Salcher Date: Tue, 1 Jul 2025 21:53:09 +0200 Subject: [PATCH] update doc strings --- src/renderer/widgets/PasswordInputField.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/renderer/widgets/PasswordInputField.cpp b/src/renderer/widgets/PasswordInputField.cpp index 7eff174..ce3f967 100644 --- a/src/renderer/widgets/PasswordInputField.cpp +++ b/src/renderer/widgets/PasswordInputField.cpp @@ -206,6 +206,7 @@ void CPasswordInputField::updatePassword() { double offset; CBox inputFieldBox = {pos, size->value()}; + // Loops and trims the password until it's length is less than the available space while (true) { std::string trimmedContent = passwordContent; @@ -227,7 +228,7 @@ void CPasswordInputField::updatePassword() { assetSize = g_pRenderer->asyncResourceGatherer->getTextAssetSize(request); offset = (inputFieldBox.h - assetSize.y) / 2.0; - // It can be safely assumed that the eye asset is always available + // It can be safely assumed that the eye asset is always available because the user can't type fast enough if (!eye.openAsset || assetSize.x <= (inputFieldBox.w - offset * 2 - eye.margin - eye.openAsset->texture.m_vSize.x)) { break; }