Fix issues on new systems

This commit is contained in:
世界
2025-09-23 21:45:01 +08:00
parent a696864985
commit 286f6fd794
8 changed files with 64 additions and 7 deletions
@@ -37,7 +37,7 @@ public func FormTextItem(_ name: LocalizedStringKey, _ systemImage: String, @Vie
}
public func FormItem(_ title: String, @ViewBuilder content: () -> some View) -> some View {
#if os(iOS) || os(tvOS)
#if os(iOS)
HStack {
Text(title)
.lineLimit(1)
@@ -46,6 +46,19 @@ public func FormItem(_ title: String, @ViewBuilder content: () -> some View) ->
Spacer()
content()
}
#elseif os(tvOS)
HStack {
Text(title)
.frame(maxWidth: .infinity, alignment: .leading)
.lineLimit(1)
.layoutPriority(1)
Spacer()
Spacer()
content()
.frame(maxWidth: .infinity, alignment: .leading)
.lineLimit(1)
.layoutPriority(1)
}
#elseif os(macOS)
content()
#endif
@@ -115,6 +128,7 @@ public func FormNavigationLink(@ViewBuilder destination: () -> some View, @ViewB
.toolbar {
ToolbarItemGroup(placement: .topBarLeading) {
BackButton()
.tint(.accentColor)
}
}
}, label: label)