From cd8a7cf4a8dd77e11184202f6b67161383942652 Mon Sep 17 00:00:00 2001 From: Ruben Beltran del Rio Date: Wed, 26 Apr 2023 17:18:09 +0200 Subject: Make the properties public --- Sources/Patterns/Pattern.swift | 10 +++++----- Sources/Patterns/PatternPicker.swift | 10 +++++----- Sources/Patterns/Tile.swift | 8 ++++---- 3 files changed, 14 insertions(+), 14 deletions(-) (limited to 'Sources') diff --git a/Sources/Patterns/Pattern.swift b/Sources/Patterns/Pattern.swift index 4fbc528..6c63870 100644 --- a/Sources/Patterns/Pattern.swift +++ b/Sources/Patterns/Pattern.swift @@ -1,16 +1,16 @@ import SwiftUI public struct Pattern: View { + + @Binding public var design: TileDesign; + public var pixelSize: CGFloat = 2.0; + public var foregroundColor: Color = .black + public var backgroundColor: Color = .white private var patternSize: CGFloat { pixelSize * 8.0; } - @Binding var design: TileDesign; - var pixelSize: CGFloat = 2.0; - var foregroundColor: Color = .black - var backgroundColor: Color = .white - public var body: some View { GeometryReader { gr in VStack(spacing: 0) { diff --git a/Sources/Patterns/PatternPicker.swift b/Sources/Patterns/PatternPicker.swift index 1f7d17b..3f550e5 100644 --- a/Sources/Patterns/PatternPicker.swift +++ b/Sources/Patterns/PatternPicker.swift @@ -2,12 +2,12 @@ import SwiftUI public struct PatternPicker: View { - @Binding var selectedDesign: TileDesign; + @Binding public var selectedDesign: TileDesign; - var selectedColor: Color = .accentColor - var pixelSize: CGFloat = 2.0; - var foregroundColor: Color = .black - var backgroundColor: Color = .white + public var selectedColor: Color = .accentColor + public var pixelSize: CGFloat = 2.0; + public var foregroundColor: Color = .black + public var backgroundColor: Color = .white let patterns = TileDesign.allCases diff --git a/Sources/Patterns/Tile.swift b/Sources/Patterns/Tile.swift index 3893324..816ebc5 100644 --- a/Sources/Patterns/Tile.swift +++ b/Sources/Patterns/Tile.swift @@ -2,10 +2,10 @@ import SwiftUI public struct Tile: View { - let design: TileDesign - var pixelSize: CGFloat = 2.0; - var foregroundColor: Color = .black - var backgroundColor: Color = .white + public let design: TileDesign + public var pixelSize: CGFloat = 2.0; + public var foregroundColor: Color = .black + public var backgroundColor: Color = .white private var pixels: [Int] { design.pixels() -- cgit