mirror of
https://github.com/coteditor/CotEditor.git
synced 2024-09-19 23:27:42 +03:00
Add @ViewBuilder annotation
This commit is contained in:
parent
b2e98ab866
commit
e5ab085f0d
@ -255,7 +255,7 @@ private struct CreditsView: View {
|
||||
var content: () -> Content
|
||||
|
||||
|
||||
init(_ label: String, content: @escaping () -> Content) {
|
||||
init(_ label: String, @ViewBuilder content: @escaping () -> Content) {
|
||||
|
||||
self.label = label
|
||||
self.content = content
|
||||
|
@ -51,11 +51,11 @@ private extension Edge {
|
||||
}
|
||||
|
||||
|
||||
private struct PopoverHolderView<T: View>: NSViewRepresentable {
|
||||
private struct PopoverHolderView<Content: View>: NSViewRepresentable {
|
||||
|
||||
@Binding var isPresented: Bool
|
||||
let arrowEdge: Edge
|
||||
var content: () -> T
|
||||
@ViewBuilder var content: () -> Content
|
||||
|
||||
|
||||
func makeNSView(context: Context) -> NSView {
|
||||
|
@ -78,7 +78,7 @@ struct SyntaxFileMappingEditView: View {
|
||||
|
||||
|
||||
@Binding var items: [Item]
|
||||
let label: () -> (Label)
|
||||
let label: () -> Label
|
||||
|
||||
@State private var selection: Set<Item.ID> = []
|
||||
@FocusState private var focusedField: Item.ID?
|
||||
|
@ -29,7 +29,7 @@ struct WrappingHStack<Content: View>: View {
|
||||
|
||||
var horizontalSpacing: Double = 4
|
||||
var verticalSpacing: Double = 4
|
||||
var content: () -> Content
|
||||
@ViewBuilder var content: () -> Content
|
||||
|
||||
|
||||
var body: some View {
|
||||
|
Loading…
Reference in New Issue
Block a user