diff --git a/VDS/Components/Line/Line.swift b/VDS/Components/Line/Line.swift index 17bf92c1..4100c63a 100644 --- a/VDS/Components/Line/Line.swift +++ b/VDS/Components/Line/Line.swift @@ -45,7 +45,7 @@ open class Line: View { // MARK: - Configuration //-------------------------------------------------- /// Width of the line. - public let lineWidth: CGFloat = 1.0 + public static let lineWidth: CGFloat = 1.0 //-------------------------------------------------- // MARK: - Public Properties @@ -59,9 +59,9 @@ open class Line: View { /// The natural size for the receiving view, considering only properties of the view itself. open override var intrinsicContentSize: CGSize { if orientation == .vertical { - return .init(width: 1, height: bounds.height) + return .init(width: Self.lineWidth, height: bounds.height) } else { - return .init(width: bounds.width, height: 1) + return .init(width: bounds.width, height: Self.lineWidth) } } @@ -103,7 +103,7 @@ open class Line: View { guard let context = UIGraphicsGetCurrentContext() else { return } context.setStrokeColor(lineViewColorConfiguration.getColor(self).cgColor) - context.setLineWidth(lineWidth) + context.setLineWidth(Self.lineWidth) if orientation == .horizontal { context.move(to: CGPoint(x: 0, y: rect.height / 2))