From 25c36c8c72364807f5107039ac35b2e6c5d2290d Mon Sep 17 00:00:00 2001 From: talksik Date: Thu, 16 Dec 2021 23:03:57 -0800 Subject: [PATCH] good place now with sizing and feel --- .../v2/InnerCircle/InnerCircleView.swift | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/nirvana-ios/v2/InnerCircle/InnerCircleView.swift b/nirvana-ios/v2/InnerCircle/InnerCircleView.swift index 94c49e0..95d9ae5 100644 --- a/nirvana-ios/v2/InnerCircle/InnerCircleView.swift +++ b/nirvana-ios/v2/InnerCircle/InnerCircleView.swift @@ -103,21 +103,21 @@ struct InnerCircleView: View { // TODO: change the number of columns based on the number of items private static var numberOfItems: Int = 15 private static let size: CGFloat = 80 - private static let spacingBetweenColumns: CGFloat = 10 - private static let spacingBetweenRows: CGFloat = 10 - private static let totalColumns: Int = Int(log2(Double(Self.numberOfItems))) + 1 // scaling the circles + private static let spacingBetweenColumns: CGFloat = 0 + private static let spacingBetweenRows: CGFloat = 0 + private static let totalColumns: Int = Int(log2(Double(Self.numberOfItems))) // scaling the circles and calculating column count @State private var selectedUserIndex = 0 // TODO: change the size to adaptive or something to make outer ring items shrink their overall size and fit better let gridItems: [GridItem] = Array( - repeating: GridItem(.fixed(size), spacing: spacingBetweenColumns, alignment: .center), + repeating: GridItem(.fixed(Self.size), spacing: spacingBetweenColumns, alignment: .center), count: totalColumns) - private let big:CGFloat = 1.1 - private let medium:CGFloat = 0.8 + private let big:CGFloat = 1 + private let medium:CGFloat = 0.85 private let small:CGFloat = 0.5 - private let supersmall:CGFloat = 0.2 + private let supersmall:CGFloat = 0.3 private let center: CGPoint = CGPoint(x: UIScreen.main.bounds.width*0.5,y: UIScreen.main.bounds.height*0.5) @@ -133,17 +133,19 @@ struct InnerCircleView: View { // TODO: why did I start at 1? for the image name? just decrease count for that specifically ForEach(1..