better stats formatting

undo
saint 2024-05-31 14:23:36 -04:00
parent 1aae36dfbc
commit 8774723f43
2 changed files with 38 additions and 44 deletions

View File

@ -19,58 +19,52 @@ struct StatsPanel: View {
Array(repeatElement(GridItem(.flexible()), count: columnCount)) Array(repeatElement(GridItem(.flexible()), count: columnCount))
} }
var body: some View { var body: some View {
LazyVGrid (columns:columns , spacing: 5) { HStack(spacing: 5) {
VStack { VStack (spacing: 5) {
Text("back Ribbon")
.foregroundColor(Color(UIColor(red: 0.76, green: 0.76, blue: 0.76, alpha: 1.00)))
.font(Font.custom("AveriaSerifLibre-Regular", size: fontSize))
RibbonDebug(ribbonDebug: RibbonDebugPrint(ribbon: backRibbon[0]))
}
VStack { VStack {
Text("next Ribbon") Text("back Ribbon")
.foregroundColor(Color(UIColor(red: 0.76, green: 0.76, blue: 0.76, alpha: 1.00))) .foregroundColor(Color(UIColor(red: 0.76, green: 0.76, blue: 0.76, alpha: 1.00)))
.font(Font.custom("AveriaSerifLibre-Regular", size: fontSize)) .font(Font.custom("AveriaSerifLibre-Regular", size: fontSize))
if (nextRibbon.count > 0) { RibbonDebug(ribbonDebug: RibbonDebugPrint(ribbon: backRibbon[0]))
RibbonDebug(ribbonDebug: RibbonDebugPrint(ribbon: nextRibbon[0])) }
VStack {
Text("next Ribbon")
.foregroundColor(Color(UIColor(red: 0.76, green: 0.76, blue: 0.76, alpha: 1.00)))
.font(Font.custom("AveriaSerifLibre-Regular", size: fontSize))
if nextRibbon.count > 0 {
RibbonDebug(ribbonDebug: RibbonDebugPrint(ribbon: nextRibbon[0]))
}
}
VStack {
Text("selected Ribbon")
.foregroundColor(Color(UIColor(red: 0.76, green: 0.76, blue: 0.76, alpha: 1.00)))
.font(Font.custom("AveriaSerifLibre-Regular", size: fontSize))
RibbonDebug(ribbonDebug: RibbonDebugPrint(ribbon: selectedRibbon[0]))
}
VStack {
Text("pc offset: \(paneConnector.currentOffset)")
.foregroundColor(Color(UIColor(red: 0.76, green: 0.76, blue: 0.76, alpha: 1.00)))
.font(Font.custom("AveriaSerifLibre-Regular", size: fontSize))
}
VStack {
Text("pc id: \(paneConnector.currentId)")
.foregroundColor(Color(UIColor(red: 0.76, green: 0.76, blue: 0.76, alpha: 1.00)))
.font(Font.custom("AveriaSerifLibre-Regular", size: fontSize))
} }
} }
VStack { VStack (spacing: 5) {
Text("selected Ribbon")
.foregroundColor(Color(UIColor(red: 0.76, green: 0.76, blue: 0.76, alpha: 1.00)))
.font(Font.custom("AveriaSerifLibre-Regular", size: fontSize))
RibbonDebug(ribbonDebug: RibbonDebugPrint(ribbon: selectedRibbon[0]))
}
ForEach(RibbonMap(ribbons: allRibbons), id: \.self) { ribbon in ForEach(RibbonMap(ribbons: allRibbons), id: \.self) { ribbon in
Print("quack3: \(ribbon)") Print("quack3: \(ribbon)")
RibbonDebug(ribbonDebug: ribbon) RibbonDebug(ribbonDebug: ribbon)
} }
//VStack(spacing: 10) {
// Text("All Ribbons")
// .foregroundColor(Color(UIColor(red: 0.76, green: 0.76, blue: 0.76, alpha: 1.00)))
// .font(Font.custom("AveriaSerifLibre-Regular", size: fontSize))
// ForEach(RibbonMap(ribbons: allRibbons), id: \.self) { ribbon in
// //Print("quack2: \(ribbon)")
// RibbonDebug(ribbonDebug: RibbonDebugPrint(ribbon: ribbon))
// }
//}
VStack {
Text("pc offset: \(paneConnector.currentOffset)")
.foregroundColor(Color(UIColor(red: 0.76, green: 0.76, blue: 0.76, alpha: 1.00)))
.font(Font.custom("AveriaSerifLibre-Regular", size: fontSize))
} }
VStack {
Text("pc id: \(paneConnector.currentId)")
.foregroundColor(Color(UIColor(red: 0.76, green: 0.76, blue: 0.76, alpha: 1.00)))
.font(Font.custom("AveriaSerifLibre-Regular", size: fontSize))
}
} }
} }
} }

View File

@ -235,8 +235,8 @@ class PaneConnector: NSObject, ObservableObject {
var currentId = "" var currentId = ""
var currentOffset = CGFloat() var currentOffset = CGFloat()
var visibilityTracker: VisibilityTracker<String>? var visibilityTracker: VisibilityTracker<String>?
var scrollId = "" @Published var scrollId = ""
var scrollOffset = CGFloat() @Published var scrollOffset = CGFloat()
var setScrollOffset: CGFloat? var setScrollOffset: CGFloat?
} }