Reformat code

This commit is contained in:
世界
2026-01-12 08:17:59 +08:00
parent b937e8d24a
commit 69e7ac9ad2
5 changed files with 13 additions and 14 deletions
@@ -5,10 +5,10 @@ import SwiftUI
public extension View {
@ViewBuilder
func tabViewBottomAccessoryCompat<Content: View>(
func tabViewBottomAccessoryCompat(
isEnabled: Bool = true,
useSystemAccessory: Bool = true,
@ViewBuilder content: @escaping () -> Content
@ViewBuilder content: @escaping () -> some View
) -> some View {
if isEnabled {
if #available(iOS 26.0, *), useSystemAccessory {
@@ -24,7 +24,6 @@ import SwiftUI
self
}
}
}
private struct TabViewBottomAccessoryContainer<Content: View>: View {
@@ -61,6 +60,5 @@ import SwiftUI
static let horizontalPadding: CGFloat = 20
static let topPadding: CGFloat = 8
static let bottomPadding: CGFloat = 12
}
#endif
+1
View File
@@ -93,6 +93,7 @@ public extension Color {
return bestColor
}
}
#elseif canImport(AppKit)
public extension NSColor {
var relativeLuminance: CGFloat {
+1 -1
View File
@@ -96,7 +96,7 @@ struct MainView: View {
}
@ViewBuilder
private func tabBarBackgroundIfAvailable<Content: View>(_ content: Content) -> some View {
private func tabBarBackgroundIfAvailable(_ content: some View) -> some View {
content
}