mirror of
https://github.com/XcodesOrg/XcodesApp.git
synced 2026-03-25 08:55:46 +00:00
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
This commit is contained in:
parent
8c5ae40b1e
commit
cce80ae012
1 changed files with 3 additions and 3 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue