grid for stats

undo
saint 2024-05-31 13:47:06 -04:00
parent bd1923cfb4
commit 983bba2849
2 changed files with 7 additions and 8 deletions

View File

@ -14,8 +14,12 @@ struct StatsPanel: View {
@Query(SelectedRibbonRequest()) private var selectedRibbon: [Ribbon]
@Environment(\.appDatabase) private var appDatabase
let columnCount = 2
var columns: [GridItem] {
Array(repeatElement(GridItem(.flexible()), count: columnCount))
}
var body: some View {
VStack (spacing: 10) {
LazyVGrid (columns:columns , spacing: 5) {
VStack {
Text("back Ribbon")
.foregroundColor(Color(UIColor(red: 0.76, green: 0.76, blue: 0.76, alpha: 1.00)))

View File

@ -308,18 +308,13 @@ struct ContentView: View {
.background(Color(red: 0.1, green: 0.1, blue: 0.1))
.frame(alignment: .topLeading)
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 {
NaviBar(paneConnector: paneConnector)
StatsPanel(paneConnector: paneConnector)
}
.frame(maxWidth: 250)
.offset(x: geometry.size.width - 250)
.offset(x: geometry.size.width - 330)
VStack {
// Top pane
@ -400,7 +395,7 @@ struct ContentView: View {
} else if viewState.width > 0 && pulledOut.width < 0 {
setPulledOutWith = CGFloat(0)
} else if viewState.width < 0 && pulledOut.width == 0 {
setPulledOutWith = CGFloat(-200)
setPulledOutWith = CGFloat(-300)
} else if abs(viewState.width + pulledOut.width) > 30 {
setPulledOutWith = CGFloat(200)
}