some formatting stuff i guess
							parent
							
								
									4c484ccd90
								
							
						
					
					
						commit
						605c165523
					
				| 
						 | 
					@ -7,10 +7,11 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import GRDB
 | 
					import GRDB
 | 
				
			||||||
import GRDBQuery
 | 
					import GRDBQuery
 | 
				
			||||||
import SwiftUIIntrospect
 | 
					 | 
				
			||||||
import os
 | 
					import os
 | 
				
			||||||
import SwiftUI
 | 
					import SwiftUI
 | 
				
			||||||
 | 
					import SwiftUIIntrospect
 | 
				
			||||||
import WrappingHStack
 | 
					import WrappingHStack
 | 
				
			||||||
 | 
					
 | 
				
			||||||
let logger = Logger(subsystem: Bundle.main.bundleIdentifier!, category: "network")
 | 
					let logger = Logger(subsystem: Bundle.main.bundleIdentifier!, category: "network")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
var currentId: String?
 | 
					var currentId: String?
 | 
				
			||||||
| 
						 | 
					@ -141,7 +142,6 @@ struct RibbonCrown: View {
 | 
				
			||||||
                alignment: .center
 | 
					                alignment: .center
 | 
				
			||||||
            ).foregroundColor(Color(UIColor(red: 0.30, green: 0.30, blue: 0.30, alpha: 0.4)))
 | 
					            ).foregroundColor(Color(UIColor(red: 0.30, green: 0.30, blue: 0.30, alpha: 0.4)))
 | 
				
			||||||
                .contentShape(.dragPreview, RoundedRectangle(cornerRadius: 32))
 | 
					                .contentShape(.dragPreview, RoundedRectangle(cornerRadius: 32))
 | 
				
			||||||
 | 
					 | 
				
			||||||
                .if(draggedRibbon != nil && draggedRibbon!.id == ribbon.id && isDragging) { $0.overlay(Color(red: 0.1, green: 0.1, blue: 0.1)) }
 | 
					                .if(draggedRibbon != nil && draggedRibbon!.id == ribbon.id && isDragging) { $0.overlay(Color(red: 0.1, green: 0.1, blue: 0.1)) }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            // .offset(x: 10)
 | 
					            // .offset(x: 10)
 | 
				
			||||||
| 
						 | 
					@ -208,35 +208,34 @@ private struct SegRow: View {
 | 
				
			||||||
        let decoder = JSONDecoder()
 | 
					        let decoder = JSONDecoder()
 | 
				
			||||||
        var retView = WrappingHStack(alignment: .leading, horizontalSpacing: 0) {
 | 
					        var retView = WrappingHStack(alignment: .leading, horizontalSpacing: 0) {
 | 
				
			||||||
            ForEach(0 ..< segSplit.count, id: \.self) { segIndex in
 | 
					            ForEach(0 ..< segSplit.count, id: \.self) { segIndex in
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                let verse = try! decoder.decode(Verse.self, from: segSplit[segIndex].data(using: .utf8)!)
 | 
					                let verse = try! decoder.decode(Verse.self, from: segSplit[segIndex].data(using: .utf8)!)
 | 
				
			||||||
                let arrayOfText = verse.body.components(separatedBy: " ")
 | 
					                let arrayOfText = verse.body.components(separatedBy: " ")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                let lineHeight = CGFloat(30)
 | 
					                let lineHeight = CGFloat(30)
 | 
				
			||||||
                let fontSize = CGFloat(20)
 | 
					                let fontSize = CGFloat(20)
 | 
				
			||||||
                let highlightColor = "470000"
 | 
					                let highlightColor = "470000"
 | 
				
			||||||
 | 
					 | 
				
			||||||
                ForEach(0 ..< arrayOfText.count, id: \.self) { index in
 | 
					                ForEach(0 ..< arrayOfText.count, id: \.self) { index in
 | 
				
			||||||
                    HStack(spacing: 0) {
 | 
					                    HStack(spacing: 0) {
 | 
				
			||||||
                        if index == 0 {
 | 
					                        if index == 0 {
 | 
				
			||||||
 | 
					 | 
				
			||||||
                            Text("")
 | 
					                            Text("")
 | 
				
			||||||
                                .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( self.highlights.contains(verse.verse) ) { $0.background(Color.init(hex: highlightColor)) }
 | 
					                                .if(self.highlights.contains(verse.verse)) { $0.background(Color(hex: highlightColor)) }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                            VStack(spacing: 0) {
 | 
					                            VStack(spacing: 0) {
 | 
				
			||||||
                                ZStack {
 | 
					                                ZStack {
 | 
				
			||||||
                                    Text(" ")
 | 
					                                    Text(" ")
 | 
				
			||||||
                                        .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( self.highlights.contains(verse.verse) ) { $0.background(Color.init(hex: highlightColor)) }
 | 
					                                        .if(self.highlights.contains(verse.verse)) { $0.background(Color(hex: highlightColor)) }
 | 
				
			||||||
                                    Text(String(verse.verse))
 | 
					                                    Text(String(verse.verse))
 | 
				
			||||||
                                        .font(Font.custom("AveriaSerifLibre-Regular", size: 10))
 | 
					                                        .font(Font.custom("AveriaSerifLibre-Regular", size: 10))
 | 
				
			||||||
                                        .padding(.horizontal, 0)
 | 
					                                        .padding(.horizontal, 0)
 | 
				
			||||||
                                        .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)))
 | 
				
			||||||
                                .if( self.highlights.contains(verse.verse) ) { $0.background(Color.init(hex: highlightColor)) }
 | 
					                                        .if(self.highlights.contains(verse.verse)) { $0.background(Color(hex: highlightColor)) }
 | 
				
			||||||
                                }
 | 
					                                }
 | 
				
			||||||
                                .if( self.highlights.contains(verse.verse) ) { $0.background(Color.init(hex: highlightColor)) }
 | 
					                                .if(self.highlights.contains(verse.verse)) { $0.background(Color(hex: highlightColor)) }
 | 
				
			||||||
                            }
 | 
					                            }
 | 
				
			||||||
                        }
 | 
					                        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -244,12 +243,8 @@ private struct SegRow: View {
 | 
				
			||||||
                            .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))
 | 
				
			||||||
                            .padding(.horizontal, 1.5) // intra word spacing
 | 
					                            .padding(.horizontal, 1.5) // intra word spacing
 | 
				
			||||||
 | 
					                            .if(self.highlights.contains(verse.verse)) { $0.background(Color(hex: highlightColor)) }
 | 
				
			||||||
                                .if( self.highlights.contains(verse.verse) ) { $0.background(Color.init(hex: highlightColor)) }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                            .foregroundColor(Color.white)
 | 
					                            .foregroundColor(Color.white)
 | 
				
			||||||
 | 
					 | 
				
			||||||
                            .onTapGesture {
 | 
					                            .onTapGesture {
 | 
				
			||||||
                                Print(arrayOfText[index])
 | 
					                                Print(arrayOfText[index])
 | 
				
			||||||
                                Print(verse.verse)
 | 
					                                Print(verse.verse)
 | 
				
			||||||
| 
						 | 
					@ -262,6 +257,7 @@ private struct SegRow: View {
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                    .frame(height: 16) // intra line spacing
 | 
					                    .frame(height: 16) // intra line spacing
 | 
				
			||||||
                    .padding(.vertical, 0)
 | 
					                    .padding(.vertical, 0)
 | 
				
			||||||
 | 
					                    // .if( index == 0 ) { $0.offset(x: -6) }
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue