added gitignore

undo
saint 2023-11-14 16:39:46 -05:00
parent d623d9c34e
commit f3d52a23f7
3 changed files with 67 additions and 71 deletions

BIN
.DS_Store vendored

Binary file not shown.

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
xcuserdata/ xcuserdata/
build/ build/
.DS_Store

View File

@ -42,18 +42,6 @@ extension UserDefaults {
} }
} }
struct BlueButtonStyle: ButtonStyle {
func makeBody(configuration: Self.Configuration) -> some View {
configuration.label
.font(.headline)
.frame(width: 100)
.contentShape(Rectangle())
.foregroundColor(configuration.isPressed ? Color.white.opacity(0.5) : Color.black)
.background(configuration.isPressed ? Color.purple.opacity(0.5) : Color.purple)
.listRowBackground(configuration.isPressed ? Color.blue.opacity(0.5) : Color.black)
}
}
func goToRibbon(selectedRibbon: Ribbon, func goToRibbon(selectedRibbon: Ribbon,
destRibbon: Ribbon, destRibbon: Ribbon,
scrollId: Binding<String?>, scrollId: Binding<String?>,
@ -121,6 +109,7 @@ func goToRibbon(selectedRibbon: Ribbon,
// print("scrollIdToSave: ", scrollIdToSave) // print("scrollIdToSave: ", scrollIdToSave)
} }
} }
extension View { extension View {
@ViewBuilder @ViewBuilder
func `if`<Transform: View>(_ condition: Bool, transform: (Self) -> Transform) -> some View { func `if`<Transform: View>(_ condition: Bool, transform: (Self) -> Transform) -> some View {
@ -151,17 +140,25 @@ struct RibbonCrown : View {
var body: some View { var body: some View {
ZStack { ZStack {
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))) 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)))
.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)
Text(ribbon.title) Text(ribbon.title)
.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)))
// .foregroundColor(.white)) // .foregroundColor(.white))
// .foregroundColor(.black) // .foregroundColor(.black)
.frame(minWidth: CGFloat(70), maxWidth: CGFloat(70), minHeight: height, maxHeight: height, alignment: .center) .frame(minWidth: CGFloat(70),
maxWidth: CGFloat(70),
minHeight: height,
maxHeight: height,
alignment: .center)
.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)) }
@ -169,7 +166,7 @@ struct RibbonCrown : View {
// .if(!isDragging || draggedRibbon == nil || draggedRibbon!.id != ribbon.id) { $0.background(Color(red: 0.1, green: 0.1, blue: 0.1)) } // .if(!isDragging || draggedRibbon == nil || draggedRibbon!.id != ribbon.id) { $0.background(Color(red: 0.1, green: 0.1, blue: 0.1)) }
// .if(draggedRibbon != nil && draggedRibbon!.id == ribbon.id) { $0.background(.red) } // .if(draggedRibbon != nil && draggedRibbon!.id == ribbon.id) { $0.background(.red) }
.background(Color(red: 0.1, green: 0.1, blue: 0.1)) .background(Color(red: 0.1, green: 0.1, blue: 0.1))
.offset(x: 10) // .offset(x: 10)
// .background(Color(red: 0.1, green: 0.1, blue: 0.1)) // .background(Color(red: 0.1, green: 0.1, blue: 0.1))
// .background(.red) // .background(.red)
// .background(.yellow) // .background(.yellow)
@ -363,7 +360,6 @@ struct ContentView: View {
draggedRibbon: draggedRibbon, draggedRibbon: draggedRibbon,
isDragging: isDragging isDragging: isDragging
) )
// .offset(x: 6, y: 6)
.onDrag { .onDrag {
self.draggedRibbon = ribbon self.draggedRibbon = ribbon
return NSItemProvider() return NSItemProvider()
@ -374,6 +370,7 @@ struct ContentView: View {
isDragging: $isDragging, isDragging: $isDragging,
appDatabase: appDatabase) appDatabase: appDatabase)
) )
.offset(x: 6, y: 6)
} }
@ -797,7 +794,6 @@ struct ContentView: View {
} }
if (showOverlay) { if (showOverlay) {
Rectangle() Rectangle()
.frame(width: geometry.size.width - 50, height: geometry.size.height + 200) .frame(width: geometry.size.width - 50, height: geometry.size.height + 200)
@ -813,7 +809,6 @@ struct ContentView: View {
.offset(x: viewState.width, y: viewState.height) .offset(x: viewState.width, y: viewState.height)
.zIndex(2) .zIndex(2)
} }
} }