From 11da1e7f137172f6ff242910a825985e8f567799 Mon Sep 17 00:00:00 2001 From: Felix Salcher Date: Sat, 28 Jun 2025 00:58:41 +0200 Subject: [PATCH] update eye size to be the same as password and dots --- src/renderer/widgets/PasswordInputField.cpp | 2 +- src/renderer/widgets/PasswordInputField.hpp | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/renderer/widgets/PasswordInputField.cpp b/src/renderer/widgets/PasswordInputField.cpp index d16cfbb..8a4b7f8 100644 --- a/src/renderer/widgets/PasswordInputField.cpp +++ b/src/renderer/widgets/PasswordInputField.cpp @@ -263,7 +263,7 @@ void CPasswordInputField::updateEye() { request.type = CAsyncResourceGatherer::eTargetType::TARGET_TEXT; request.props["font_family"] = fontFamily; request.props["color"] = colorConfig.font; - request.props["font_size"] = eye.size; + request.props["font_size"] = (int)(std::nearbyint(configSize.y * eye.size * 0.5f) * 2.f); eye.resourceID = textResourceID; diff --git a/src/renderer/widgets/PasswordInputField.hpp b/src/renderer/widgets/PasswordInputField.hpp index 788eb3a..c97d288 100644 --- a/src/renderer/widgets/PasswordInputField.hpp +++ b/src/renderer/widgets/PasswordInputField.hpp @@ -76,7 +76,7 @@ class CPasswordInputField : public IWidget { struct { bool center = false; - float size = .25; + float size = 0.25; std::string content = ""; std::string resourceID = ""; std::string pendingResourceID = ""; @@ -86,12 +86,11 @@ class CPasswordInputField : public IWidget { } password; struct { - int size = 16; + int margin = 4; + double size = 0.25; std::string resourceID = ""; std::string placement = "right"; SPreloadedAsset* asset = nullptr; - - const int margin = 4; } eye; struct {