added gitignore
parent
d623d9c34e
commit
f3d52a23f7
|
@ -1,2 +1,3 @@
|
|||
xcuserdata/
|
||||
build/
|
||||
.DS_Store
|
||||
|
|
|
@ -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,
|
||||
destRibbon: Ribbon,
|
||||
scrollId: Binding<String?>,
|
||||
|
@ -121,6 +109,7 @@ func goToRibbon(selectedRibbon: Ribbon,
|
|||
// print("scrollIdToSave: ", scrollIdToSave)
|
||||
}
|
||||
}
|
||||
|
||||
extension View {
|
||||
@ViewBuilder
|
||||
func `if`<Transform: View>(_ condition: Bool, transform: (Self) -> Transform) -> some View {
|
||||
|
@ -151,17 +140,25 @@ struct RibbonCrown : View {
|
|||
var body: some View {
|
||||
|
||||
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)) }
|
||||
|
||||
.offset(x: 10)
|
||||
// .offset(x: 10)
|
||||
|
||||
Text(ribbon.title)
|
||||
.foregroundColor(Color(UIColor(red: 0.76, green: 0.76, blue: 0.76, alpha: 1.00)))
|
||||
// .foregroundColor(.white))
|
||||
// .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)) }
|
||||
|
@ -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(draggedRibbon != nil && draggedRibbon!.id == ribbon.id) { $0.background(.red) }
|
||||
.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(.red)
|
||||
// .background(.yellow)
|
||||
|
@ -363,7 +360,6 @@ struct ContentView: View {
|
|||
draggedRibbon: draggedRibbon,
|
||||
isDragging: isDragging
|
||||
)
|
||||
// .offset(x: 6, y: 6)
|
||||
.onDrag {
|
||||
self.draggedRibbon = ribbon
|
||||
return NSItemProvider()
|
||||
|
@ -374,6 +370,7 @@ struct ContentView: View {
|
|||
isDragging: $isDragging,
|
||||
appDatabase: appDatabase)
|
||||
)
|
||||
.offset(x: 6, y: 6)
|
||||
}
|
||||
|
||||
|
||||
|
@ -797,7 +794,6 @@ struct ContentView: View {
|
|||
}
|
||||
|
||||
if (showOverlay) {
|
||||
|
||||
Rectangle()
|
||||
.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)
|
||||
|
||||
.zIndex(2)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue