diff --git a/Sources/Core/View/ScrollView.swift b/Sources/Core/View/ScrollView.swift index 769851c..5ca9461 100644 --- a/Sources/Core/View/ScrollView.swift +++ b/Sources/Core/View/ScrollView.swift @@ -14,6 +14,8 @@ public struct ScrollView: SwiftUIWidget { var axes: Set /// The view's content. var content: Body + /// Whether to hide the scroll indicators. + var hideScrollIndicators = false /// The wrapped views. public var wrappedViews: [String: any Meta.AnyView] { @@ -34,6 +36,14 @@ public struct ScrollView: SwiftUIWidget { SwiftUI.ScrollView(properties.axes.swiftUI) { MacBackendView(.mainContent) } + .scrollIndicators(properties.hideScrollIndicators ? .hidden : .automatic) + } + + /// Whether to hide the scroll indicators. + /// - Parameter enabled: Whether the scroll indicators are hidden. + /// - Returns: The scroll view. + public func hideScrollIndicators(_ enabled: Bool = true) -> Self { + modify { $0.hideScrollIndicators = enabled } } }