diff --git a/Sources/FioriSwiftUICore/Components/CancellableResettableForm.swift b/Sources/FioriSwiftUICore/Components/CancellableResettableForm.swift index c17ce5436..b38ba4049 100644 --- a/Sources/FioriSwiftUICore/Components/CancellableResettableForm.swift +++ b/Sources/FioriSwiftUICore/Components/CancellableResettableForm.swift @@ -34,12 +34,20 @@ struct CancellableResettableDialogForm AnyView } +#if !os(visionOS) + /// Default option list picker foreground color + public let DefaultOptionListPickerForegroundColor = Color.preferredColor(.tintColor) +#else + /// Default option list picker foreground color + public let DefaultOptionListPickerForegroundColor = Color.preferredColor(.primaryLabel) +#endif + /// Default option list picker style public struct DefaultOptionListPickerStyle: OptionListPickerStyle { let font: Font @@ -68,7 +76,7 @@ public struct DefaultOptionListPickerStyle: OptionListPickerStyle { let minTouchHeight: CGFloat /// :nodoc: - public init(font: Font = .system(.body), foregroundColorSelected: Color = .preferredColor(.tintColor), foregroundColorUnselected: Color = .preferredColor(.tertiaryLabel), fillColorSelected: Color = .preferredColor(.secondaryGroupedBackground), fillColorUnselected: Color = .preferredColor(.tertiaryFill), strokeColorSelected: Color = .preferredColor(.tintColor), strokeColorUnselected: Color = .preferredColor(.separator), cornerRadius: CGFloat = 16, spacing: CGFloat = 4, borderWidth: CGFloat = 1, minHeight: CGFloat = 44, minTouchHeight: CGFloat = 50) { + public init(font: Font = .system(.body), foregroundColorSelected: Color = DefaultOptionListPickerForegroundColor, foregroundColorUnselected: Color = .preferredColor(.tertiaryLabel), fillColorSelected: Color = .preferredColor(.secondaryGroupedBackground), fillColorUnselected: Color = .preferredColor(.tertiaryFill), strokeColorSelected: Color = DefaultOptionListPickerForegroundColor, strokeColorUnselected: Color = .preferredColor(.separator), cornerRadius: CGFloat = 16, spacing: CGFloat = 4, borderWidth: CGFloat = 1, minHeight: CGFloat = 44, minTouchHeight: CGFloat = 50) { self.font = font self.foregroundColorSelected = foregroundColorSelected self.foregroundColorUnselected = foregroundColorUnselected diff --git a/Sources/FioriSwiftUICore/Views/SearchListPickerItem+View.swift b/Sources/FioriSwiftUICore/Views/SearchListPickerItem+View.swift index b3641f804..c92e7afe0 100644 --- a/Sources/FioriSwiftUICore/Views/SearchListPickerItem+View.swift +++ b/Sources/FioriSwiftUICore/Views/SearchListPickerItem+View.swift @@ -45,7 +45,11 @@ extension SearchListPickerItem: View { Spacer() if isSelected { Image(systemName: "checkmark") - .foregroundColor(.preferredColor(.tintColor)) + #if !os(visionOS) + .foregroundStyle(Color.preferredColor(.tintColor)) + #else + .foregroundStyle(Color.preferredColor(.primaryLabel)) + #endif } } .padding(0) diff --git a/Sources/FioriSwiftUICore/Views/SortFilter/FilterFeedbackBarItem+Style.swift b/Sources/FioriSwiftUICore/Views/SortFilter/FilterFeedbackBarItem+Style.swift index 4d17bba6c..31f69f85f 100644 --- a/Sources/FioriSwiftUICore/Views/SortFilter/FilterFeedbackBarItem+Style.swift +++ b/Sources/FioriSwiftUICore/Views/SortFilter/FilterFeedbackBarItem+Style.swift @@ -24,6 +24,14 @@ public protocol FilterFeedbackBarStyle { func makeBody(configuration: Self.Configuration) -> AnyView } +#if !os(visionOS) + /// default filter feedbackbar foreground color + public let DefaultFilterFeedbackBarForegroundColor = Color.preferredColor(.tintColor) +#else + /// default filter feedbackbar foreground color + public let DefaultFilterFeedbackBarForegroundColor = Color.preferredColor(.primaryLabel) +#endif + /// Default style for sort and filer menu item public struct DefaultFilterFeedbackBarStyle: FilterFeedbackBarStyle { let font: Font @@ -40,7 +48,7 @@ public struct DefaultFilterFeedbackBarStyle: FilterFeedbackBarStyle { let minHeight: CGFloat /// :nodoc: - public init(font: Font = .system(.body), foregroundColorSelected: Color = .preferredColor(.tintColor), foregroundColorUnselected: Color = .preferredColor(.tertiaryLabel), fillColorSelected: Color = Color.clear, fillColorUnselected: Color = .preferredColor(.tertiaryFill), strokeColorSelected: Color = .preferredColor(.tintColor), strokeColorUnselected: Color = .preferredColor(.separator), cornerRadius: CGFloat = 10, spacing: CGFloat = 6, padding: CGFloat = 8, borderWidth: CGFloat = 1, minHeight: CGFloat = 38) { + public init(font: Font = .system(.body), foregroundColorSelected: Color = DefaultFilterFeedbackBarForegroundColor, foregroundColorUnselected: Color = .preferredColor(.tertiaryLabel), fillColorSelected: Color = Color.clear, fillColorUnselected: Color = .preferredColor(.tertiaryFill), strokeColorSelected: Color = DefaultFilterFeedbackBarForegroundColor, strokeColorUnselected: Color = .preferredColor(.separator), cornerRadius: CGFloat = 10, spacing: CGFloat = 6, padding: CGFloat = 8, borderWidth: CGFloat = 1, minHeight: CGFloat = 38) { self.font = font self.foregroundColorSelected = foregroundColorSelected self.foregroundColorUnselected = foregroundColorUnselected