misc: Update SwiftUIIntrospect

This commit is contained in:
mrFq1
2023-08-11 15:05:10 +08:00
parent 6810e6089b
commit c3c6e44715
6 changed files with 12 additions and 11 deletions

View File

@@ -5,7 +5,7 @@
//
import SwiftUI
import Introspect
import SwiftUIIntrospect
struct APISettingView: View {
@State var baseURL: String = ""
@@ -62,7 +62,7 @@ struct APISettingView: View {
}
}
}
.introspectTableView {
.introspect(.table, on: .macOS(.v12, .v13, .v14)) {
$0.backgroundColor = NSColor.clear
$0.enclosingScrollView?.drawsBackground = false
}

View File

@@ -5,6 +5,7 @@
//
import SwiftUI
import SwiftUIIntrospect
struct ProvidersView: View {
@ObservedObject var providerStorage = DBProviderStorage()
@@ -71,7 +72,7 @@ struct ProvidersView: View {
}
}
}
.introspectTableView {
.introspect(.table, on: .macOS(.v12, .v13, .v14)) {
$0.refusesFirstResponder = true
$0.doubleAction = nil
}

View File

@@ -5,7 +5,7 @@
//
import SwiftUI
import Introspect
import SwiftUIIntrospect
class ProxiesSearchString: ObservableObject, Identifiable {
let id = UUID().uuidString
@@ -26,7 +26,7 @@ struct ProxiesView: View {
List(proxyStorage.groups, id: \.id) { group in
ProxyGroupRowView(proxyGroup: group)
}
.introspectTableView {
.introspect(.table, on: .macOS(.v12, .v13, .v14)) {
$0.refusesFirstResponder = true
$0.doubleAction = nil
}

View File

@@ -5,7 +5,7 @@
//
import SwiftUI
import Introspect
import SwiftUIIntrospect
struct SidebarListView: View {
@@ -59,7 +59,7 @@ struct SidebarListView: View {
}
}
.introspectTableView {
.introspect(.table, on: .macOS(.v12, .v13, .v14)) {
$0.refusesFirstResponder = true
if selectionName == nil {