Fix search field on macOS

This commit is contained in:
Arkadiusz Fal 2021-12-06 19:13:20 +01:00
parent 8d9bbf647a
commit 759a942426

View File

@ -37,6 +37,7 @@ struct SearchTextField: View {
}
}
#if os(macOS)
.frame(maxWidth: 190)
.textFieldStyle(.plain)
#else
.textFieldStyle(.roundedBorder)
@ -52,6 +53,11 @@ struct SearchTextField: View {
.padding(.trailing)
#endif
clearButton
} else {
#if os(macOS)
clearButton
.opacity(0)
#endif
}
}
}