From 1e7b3acc42b3bfb43b957622c038b6a3271c098c Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Thu, 17 Oct 2024 16:15:50 -0500 Subject: [PATCH] updated to var Signed-off-by: Matt Bruce --- VDS/Components/Tilelet/TileletGroup/TileletGroup.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/VDS/Components/Tilelet/TileletGroup/TileletGroup.swift b/VDS/Components/Tilelet/TileletGroup/TileletGroup.swift index 12165efe..5e71a224 100644 --- a/VDS/Components/Tilelet/TileletGroup/TileletGroup.swift +++ b/VDS/Components/Tilelet/TileletGroup/TileletGroup.swift @@ -45,7 +45,7 @@ open class TileletGroup: View { public enum Padding: String, CaseIterable { case standard, compact - private func value() -> CGFloat { + var value: CGFloat { switch self { case .standard: return UIDevice.isIPad ? 40.0 : VDSLayout.space3X @@ -54,9 +54,9 @@ open class TileletGroup: View { } } - func horizontalValue() -> CGFloat { value() } + func horizontalValue() -> CGFloat { value } - func verticalValue() -> CGFloat { value() } + func verticalValue() -> CGFloat { value } } //-------------------------------------------------- @@ -72,7 +72,7 @@ open class TileletGroup: View { open var rowQuantityTablet: Int = 4 { didSet { updateRows() } } /// An object containing number of Button components per row - open var rowQuantity: Int { UIDevice.isIPad ? rowQuantityTablet : rowQuantityPhone } + open var rowQuantity: Int { UIDevice.isIPad ? min(rowQuantityTablet,6) : min(rowQuantityPhone, 3) } open var tilelets: [Tilelet] = [] { didSet { updateRows() } }