grid for stats
parent
bd1923cfb4
commit
983bba2849
|
@ -14,8 +14,12 @@ struct StatsPanel: View {
|
||||||
@Query(SelectedRibbonRequest()) private var selectedRibbon: [Ribbon]
|
@Query(SelectedRibbonRequest()) private var selectedRibbon: [Ribbon]
|
||||||
@Environment(\.appDatabase) private var appDatabase
|
@Environment(\.appDatabase) private var appDatabase
|
||||||
|
|
||||||
|
let columnCount = 2
|
||||||
|
var columns: [GridItem] {
|
||||||
|
Array(repeatElement(GridItem(.flexible()), count: columnCount))
|
||||||
|
}
|
||||||
var body: some View {
|
var body: some View {
|
||||||
VStack (spacing: 10) {
|
LazyVGrid (columns:columns , spacing: 5) {
|
||||||
VStack {
|
VStack {
|
||||||
Text("back 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)))
|
||||||
|
|
|
@ -308,18 +308,13 @@ struct ContentView: View {
|
||||||
.background(Color(red: 0.1, green: 0.1, blue: 0.1))
|
.background(Color(red: 0.1, green: 0.1, blue: 0.1))
|
||||||
.frame(alignment: .topLeading)
|
.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 {
|
VStack {
|
||||||
NaviBar(paneConnector: paneConnector)
|
NaviBar(paneConnector: paneConnector)
|
||||||
StatsPanel(paneConnector: paneConnector)
|
StatsPanel(paneConnector: paneConnector)
|
||||||
}
|
}
|
||||||
.frame(maxWidth: 250)
|
.frame(maxWidth: 250)
|
||||||
.offset(x: geometry.size.width - 250)
|
.offset(x: geometry.size.width - 330)
|
||||||
|
|
||||||
VStack {
|
VStack {
|
||||||
// Top pane
|
// Top pane
|
||||||
|
@ -400,7 +395,7 @@ struct ContentView: View {
|
||||||
} else if viewState.width > 0 && pulledOut.width < 0 {
|
} else if viewState.width > 0 && pulledOut.width < 0 {
|
||||||
setPulledOutWith = CGFloat(0)
|
setPulledOutWith = CGFloat(0)
|
||||||
} else if viewState.width < 0 && pulledOut.width == 0 {
|
} else if viewState.width < 0 && pulledOut.width == 0 {
|
||||||
setPulledOutWith = CGFloat(-200)
|
setPulledOutWith = CGFloat(-300)
|
||||||
} else if abs(viewState.width + pulledOut.width) > 30 {
|
} else if abs(viewState.width + pulledOut.width) > 30 {
|
||||||
setPulledOutWith = CGFloat(200)
|
setPulledOutWith = CGFloat(200)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue