Align number fields in SwiftUI to trailing

This commit is contained in:
1024jp 2022-12-14 02:05:50 +09:00
parent 49d4888e5d
commit 0e5f532b2b
2 changed files with 2 additions and 0 deletions

View File

@ -57,6 +57,7 @@ struct CustomTabWidthView: View {
Form {
TextField("Tab width:", value: $value, format: .number, prompt: Text(self.defaultWidth, format: .number))
.monospacedDigit()
.multilineTextAlignment(.trailing)
.onSubmit(self.submit)
}

View File

@ -56,6 +56,7 @@ struct GoToLineView: View {
Form {
TextField("Line:", text: $value, prompt: Text("Line Number"))
.monospacedDigit()
.multilineTextAlignment(.trailing)
.onSubmit(self.submit)
}