added gitignore
parent
d623d9c34e
commit
f3d52a23f7
|
@ -1,2 +1,3 @@
|
||||||
xcuserdata/
|
xcuserdata/
|
||||||
build/
|
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,
|
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,32 +140,40 @@ 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)) }
|
||||||
|
|
||||||
// .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)
|
||||||
.multilineTextAlignment(.center)
|
.multilineTextAlignment(.center)
|
||||||
// .minimumScaleFactor(0.5)
|
// .minimumScaleFactor(0.5)
|
||||||
// .padding([.top, .bottom], 10)
|
// .padding([.top, .bottom], 10)
|
||||||
.font(Font.custom("AveriaSerifLibre-Regular", size: CGFloat(10)))
|
.font(Font.custom("AveriaSerifLibre-Regular", size: CGFloat(10)))
|
||||||
|
|
||||||
}
|
}
|
||||||
.frame(width: CGFloat(100 * 1.66 * scale + 10 ), height:CGFloat(100 * scale + 5))
|
.frame(width: CGFloat(100 * 1.66 * scale + 10 ), height:CGFloat(100 * scale + 5))
|
||||||
|
@ -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,23 +794,21 @@ 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)
|
||||||
|
|
||||||
.background(.ultraThinMaterial)
|
.background(.ultraThinMaterial)
|
||||||
|
|
||||||
//.blur(radius: 0.8)
|
//.blur(radius: 0.8)
|
||||||
.offset(x:30, y:-100 )
|
.offset(x:30, y:-100 )
|
||||||
.opacity(0.98)
|
.opacity(0.98)
|
||||||
.transition(.opacity)
|
.transition(.opacity)
|
||||||
|
|
||||||
// .frame(width: geometry.size.width - 50)
|
// .frame(width: geometry.size.width - 50)
|
||||||
.offset(x: pulledOut.width)
|
.offset(x: pulledOut.width)
|
||||||
.offset(x: viewState.width, y: viewState.height)
|
.offset(x: viewState.width, y: viewState.height)
|
||||||
|
|
||||||
.zIndex(2)
|
|
||||||
|
|
||||||
|
.zIndex(2)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -924,9 +919,9 @@ struct DropViewDelegate: DropDelegate {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if disableDrop {
|
if disableDrop {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var newRibbon = draggedItem!
|
var newRibbon = draggedItem!
|
||||||
|
|
Loading…
Reference in New Issue