From cce80ae0123f4c9d480b45f0b4033b27b010ca8d Mon Sep 17 00:00:00 2001 From: Chad Sykes Date: Sat, 26 Dec 2020 16:02:35 -0700 Subject: [PATCH] Simple fix to ensure all characters are shown without clipping... while I could try to figure a more robust solution but it feels like there are bigger fish to fry --- Xcodes/Frontend/SignIn/PinCodeTextView.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Xcodes/Frontend/SignIn/PinCodeTextView.swift b/Xcodes/Frontend/SignIn/PinCodeTextView.swift index 3476054..45465f3 100644 --- a/Xcodes/Frontend/SignIn/PinCodeTextView.swift +++ b/Xcodes/Frontend/SignIn/PinCodeTextView.swift @@ -27,9 +27,9 @@ struct PinCodeTextField: NSViewRepresentable { struct PinCodeTextField_Previews: PreviewProvider { struct PreviewContainer: View { - @State private var code = "123" + @State private var code = "1234567890" var body: some View { - PinCodeTextField(code: $code, numberOfDigits: 6) + PinCodeTextField(code: $code, numberOfDigits: 11) .padding() } } @@ -215,7 +215,7 @@ class PinCodeCharacterTextField: NSTextField { ) .size() // I guess the cell should probably be doing this sizing in order to take into account everything outside of simply the text's frame, but for some reason I can't find a way to do that which works... - size.width += 8 + size.width += 16 size.height += 8 return size }