macos: fix some error window styling

This commit is contained in:
Mitchell Hashimoto
2023-09-11 13:28:48 -07:00
parent db799d53e6
commit f485672d4e

View File

@ -17,7 +17,7 @@ struct ConfigurationErrorsView: View {
.frame(alignment: .center) .frame(alignment: .center)
Text(""" Text("""
^[\(model.errors.count) error was](inflect: true) found while loading the configuration. \ ^[\(model.errors.count) error(s) were](inflect: true) found while loading the configuration. \
Please review the errors below and reload your configuration. Please review the errors below and reload your configuration.
""") """)
.frame(maxWidth: .infinity, alignment: .leading) .frame(maxWidth: .infinity, alignment: .leading)
@ -26,18 +26,19 @@ struct ConfigurationErrorsView: View {
GeometryReader { geo in GeometryReader { geo in
ScrollView { ScrollView {
VStack { VStack(alignment: .leading) {
ForEach(model.errors, id: \.self) { error in ForEach(model.errors, id: \.self) { error in
Text(error) Text(error)
.lineLimit(nil) .lineLimit(nil)
.font(.system(size: 12).monospaced()) .font(.system(size: 12).monospaced())
.textSelection(.enabled) .textSelection(.enabled)
.padding(.all)
.frame(maxWidth: .infinity, alignment: .topLeading) .frame(maxWidth: .infinity, alignment: .topLeading)
} }
Spacer() Spacer()
} }
.frame(height: geo.size.height) .padding(.all)
.frame(minHeight: geo.size.height)
.background(Color.white) .background(Color.white)
} }
} }