reordered added and workingish
parent
55d879fb43
commit
2d6bff5fc6
|
@ -14,8 +14,8 @@
|
||||||
filePath = "gloss/ContentView.swift"
|
filePath = "gloss/ContentView.swift"
|
||||||
startingColumnNumber = "9223372036854775807"
|
startingColumnNumber = "9223372036854775807"
|
||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "565"
|
startingLineNumber = "572"
|
||||||
endingLineNumber = "565"
|
endingLineNumber = "572"
|
||||||
landmarkName = "body"
|
landmarkName = "body"
|
||||||
landmarkType = "24">
|
landmarkType = "24">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
|
@ -30,8 +30,8 @@
|
||||||
filePath = "gloss/ContentView.swift"
|
filePath = "gloss/ContentView.swift"
|
||||||
startingColumnNumber = "9223372036854775807"
|
startingColumnNumber = "9223372036854775807"
|
||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "567"
|
startingLineNumber = "574"
|
||||||
endingLineNumber = "567"
|
endingLineNumber = "574"
|
||||||
landmarkName = "body"
|
landmarkName = "body"
|
||||||
landmarkType = "24">
|
landmarkType = "24">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
|
@ -46,8 +46,8 @@
|
||||||
filePath = "gloss/ContentView.swift"
|
filePath = "gloss/ContentView.swift"
|
||||||
startingColumnNumber = "9223372036854775807"
|
startingColumnNumber = "9223372036854775807"
|
||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "458"
|
startingLineNumber = "465"
|
||||||
endingLineNumber = "458"
|
endingLineNumber = "465"
|
||||||
landmarkName = "body"
|
landmarkName = "body"
|
||||||
landmarkType = "24">
|
landmarkType = "24">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
|
@ -62,8 +62,8 @@
|
||||||
filePath = "gloss/ContentView.swift"
|
filePath = "gloss/ContentView.swift"
|
||||||
startingColumnNumber = "9223372036854775807"
|
startingColumnNumber = "9223372036854775807"
|
||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "426"
|
startingLineNumber = "433"
|
||||||
endingLineNumber = "426"
|
endingLineNumber = "433"
|
||||||
landmarkName = "body"
|
landmarkName = "body"
|
||||||
landmarkType = "24">
|
landmarkType = "24">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
|
|
|
@ -10,6 +10,7 @@ import GRDB
|
||||||
import GRDBQuery
|
import GRDBQuery
|
||||||
import Introspect
|
import Introspect
|
||||||
import os
|
import os
|
||||||
|
import SwiftUIReorderableForEach
|
||||||
|
|
||||||
let logger = Logger(subsystem: Bundle.main.bundleIdentifier!, category: "network")
|
let logger = Logger(subsystem: Bundle.main.bundleIdentifier!, category: "network")
|
||||||
|
|
||||||
|
@ -310,6 +311,9 @@ struct ContentView: View {
|
||||||
@State var refresh: Bool = false
|
@State var refresh: Bool = false
|
||||||
|
|
||||||
@State var refresh2: Bool = false
|
@State var refresh2: Bool = false
|
||||||
|
|
||||||
|
@State var data = ["Imitation of Christ", "Psalms", "Fundamentals of Dogmatic Theology"]
|
||||||
|
@State var reorder = true
|
||||||
|
|
||||||
|
|
||||||
@Query(RibbonRequest()) private var ribbons: [Ribbon]
|
@Query(RibbonRequest()) private var ribbons: [Ribbon]
|
||||||
|
@ -335,16 +339,21 @@ struct ContentView: View {
|
||||||
var height = CGFloat(50)
|
var height = CGFloat(50)
|
||||||
var xOffset = CGFloat(25)
|
var xOffset = CGFloat(25)
|
||||||
|
|
||||||
|
var width = CGFloat(100 * 1.66 * scale)
|
||||||
|
|
||||||
|
|
||||||
GeometryReader { geometry in
|
GeometryReader { geometry in
|
||||||
ZStack (alignment: .top) {
|
ZStack (alignment: .top) {
|
||||||
VStack (alignment: .leading) {
|
VStack (alignment: .leading) {
|
||||||
VStack {
|
VStack {
|
||||||
Text("Imitation of Christ")
|
|
||||||
|
ReorderableForEach($data, allowReordering: $reorder) { item, isDragged in
|
||||||
|
Text(item)
|
||||||
.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)))
|
||||||
// // .background(Color(red: 0.3, green: 0.3, blue: 0.3))
|
// // .background(Color(red: 0.3, green: 0.3, blue: 0.3))
|
||||||
// .foregroundColor(.white))
|
// .foregroundColor(.white))
|
||||||
// .foregroundColor(.black)
|
// .foregroundColor(.black)
|
||||||
.frame(minWidth: CGFloat(75), maxWidth: CGFloat(150), minHeight: height, maxHeight: height, alignment: .center)
|
.frame(minWidth: CGFloat(75), maxWidth: width + 30, minHeight: height, maxHeight: height, alignment: .center)
|
||||||
// .background(.red)
|
// .background(.red)
|
||||||
// .background(.yellow)
|
// .background(.yellow)
|
||||||
.multilineTextAlignment(.center)
|
.multilineTextAlignment(.center)
|
||||||
|
@ -352,7 +361,7 @@ struct ContentView: View {
|
||||||
.padding([.top, .bottom], 10)
|
.padding([.top, .bottom], 10)
|
||||||
.font(Font.custom("AveriaSerifLibre-Regular", size: CGFloat(10)))
|
.font(Font.custom("AveriaSerifLibre-Regular", size: CGFloat(10)))
|
||||||
|
|
||||||
.overlay( MyIcon().frame(width: CGFloat(100 * 1.66 * scale), height: CGFloat(100 * scale), alignment: .center) .foregroundColor(Color(UIColor(red: 0.30, green: 0.30, blue: 0.30, alpha: 0.4))))
|
.overlay( MyIcon().frame(width: width, height: CGFloat(100 * scale), alignment: .center) .foregroundColor(Color(UIColor(red: 0.30, green: 0.30, blue: 0.30, alpha: 0.4))))
|
||||||
|
|
||||||
.offset(x: xOffset)
|
.offset(x: xOffset)
|
||||||
.onTapGesture {
|
.onTapGesture {
|
||||||
|
@ -360,46 +369,55 @@ struct ContentView: View {
|
||||||
// selectedLine = seg.id
|
// selectedLine = seg.id
|
||||||
// Print(selectedLine)
|
// Print(selectedLine)
|
||||||
}
|
}
|
||||||
.onDrag {
|
|
||||||
// self.draggedColor = color
|
// .overlay(isDragged ? Color.white.opacity(0.6) : Color.clear)
|
||||||
return NSItemProvider()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Text("Imitation of Christ")
|
||||||
|
|
||||||
// .offset(y: 25)
|
|
||||||
|
|
||||||
Text("Psalms")
|
|
||||||
.foregroundColor(Color(UIColor(red: 0.76, green: 0.76, blue: 0.76, alpha: 1.00)))
|
|
||||||
// .background(Color(red: 0.3, green: 0.3, blue: 0.3))
|
|
||||||
// .foregroundColor(.white))
|
|
||||||
// .foregroundColor(.black)
|
|
||||||
.overlay( MyIcon().frame(width: CGFloat(100 * 1.66 * scale), height: CGFloat(100 * scale)) .foregroundColor(Color(UIColor(red: 0.56, green: 0.30, blue: 0.30, alpha: 0.4))))
|
|
||||||
.frame(minWidth: CGFloat(75), maxWidth: CGFloat(75), minHeight: height, maxHeight: height, alignment: .center)
|
|
||||||
// .background(.red)
|
|
||||||
.multilineTextAlignment(.center)
|
|
||||||
|
|
||||||
.offset(x: xOffset)
|
|
||||||
.padding([.top, .bottom], 10)
|
|
||||||
// .minimumScaleFactor(0.5)
|
|
||||||
.font(Font.custom("AveriaSerifLibre-Regular", size: CGFloat(14)))
|
|
||||||
|
|
||||||
// Text("padding")
|
// Text("Imitation of Christ")
|
||||||
|
// .foregroundColor(Color(UIColor(red: 0.76, green: 0.76, blue: 0.76, alpha: 1.00)))
|
||||||
|
// // // .background(Color(red: 0.3, green: 0.3, blue: 0.3))
|
||||||
|
// // .foregroundColor(.white))
|
||||||
|
// // .foregroundColor(.black)
|
||||||
|
// .frame(minWidth: CGFloat(75), maxWidth: CGFloat(150), minHeight: height, maxHeight: height, alignment: .center)
|
||||||
|
// // .background(.red)
|
||||||
|
// // .background(.yellow)
|
||||||
|
// .multilineTextAlignment(.center)
|
||||||
|
// // .minimumScaleFactor(0.5)
|
||||||
|
// .padding([.top, .bottom], 10)
|
||||||
|
// .font(Font.custom("AveriaSerifLibre-Regular", size: CGFloat(10)))
|
||||||
|
|
||||||
Text("Fundamentals of Dogmatic Theology")
|
// .overlay( MyIcon().frame(width: CGFloat(100 * 1.66 * scale), height: CGFloat(100 * scale), alignment: .center) .foregroundColor(Color(UIColor(red: 0.30, green: 0.30, blue: 0.30, alpha: 0.4))))
|
||||||
.foregroundColor(Color(UIColor(red: 0.76, green: 0.76, blue: 0.76, alpha: 1.00)))
|
|
||||||
// .background(Color(red: 0.3, green: 0.3, blue: 0.3))
|
|
||||||
// .foregroundColor(.black)
|
|
||||||
.overlay( MyIcon().frame(width: CGFloat(100 * 1.66 * scale), height: CGFloat(100 * scale)) .foregroundColor(Color(UIColor(red: 0.30, green: 0.30, blue: 0.30, alpha: 0.4))))
|
|
||||||
.frame(minWidth: CGFloat(75), maxWidth: CGFloat(75), minHeight: height, maxHeight: height, alignment: .center)
|
|
||||||
// .background(.red)
|
|
||||||
.multilineTextAlignment(.center)
|
|
||||||
.padding([.top, .bottom], 10)
|
|
||||||
.offset(x: xOffset)
|
|
||||||
// .minimumScaleFactor(0.5)
|
|
||||||
.font(Font.custom("AveriaSerifLibre-Regular", size: CGFloat(10)))
|
|
||||||
// .minimumScaleFactor(0.9)
|
|
||||||
|
|
||||||
// Text("padding")
|
// .offset(x: xOffset)
|
||||||
|
// .onTapGesture {
|
||||||
|
// Print("TAP")
|
||||||
|
// // selectedLine = seg.id
|
||||||
|
// // Print(selectedLine)
|
||||||
|
// }
|
||||||
|
// .onDrag {
|
||||||
|
// // self.draggedColor = color
|
||||||
|
// return NSItemProvider()
|
||||||
|
// }
|
||||||
|
|
||||||
|
// Text("Psalms")
|
||||||
|
// .foregroundColor(Color(UIColor(red: 0.76, green: 0.76, blue: 0.76, alpha: 1.00)))
|
||||||
|
// // .background(Color(red: 0.3, green: 0.3, blue: 0.3))
|
||||||
|
// // .foregroundColor(.white))
|
||||||
|
// // .foregroundColor(.black)
|
||||||
|
// .overlay( MyIcon().frame(width: CGFloat(100 * 1.66 * scale), height: CGFloat(100 * scale)) .foregroundColor(Color(UIColor(red: 0.56, green: 0.30, blue: 0.30, alpha: 0.4))))
|
||||||
|
// .frame(minWidth: CGFloat(75), maxWidth: CGFloat(75), minHeight: height, maxHeight: height, alignment: .center)
|
||||||
|
// // .background(.red)
|
||||||
|
// .multilineTextAlignment(.center)
|
||||||
|
|
||||||
|
// .offset(x: xOffset)
|
||||||
|
// .padding([.top, .bottom], 10)
|
||||||
|
// // .minimumScaleFactor(0.5)
|
||||||
|
// .font(Font.custom("AveriaSerifLibre-Regular", size: CGFloat(14)))
|
||||||
|
|
||||||
}
|
}
|
||||||
.frame(width: geometry.size.width, height: geometry.size.height - 100, alignment: .topLeading)
|
.frame(width: geometry.size.width, height: geometry.size.height - 100, alignment: .topLeading)
|
||||||
|
@ -424,7 +442,7 @@ 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)
|
||||||
.animation(nil)
|
//.animation(nil)
|
||||||
|
|
||||||
VStack {
|
VStack {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue