slight design changes and finally added an app icon woo!

This commit is contained in:
breadone 2024-07-08 12:29:21 +12:00
parent 47bc5d1b47
commit 6ec348841c
No known key found for this signature in database
7 changed files with 30 additions and 21 deletions

View File

@ -1,6 +1,7 @@
{ {
"images" : [ "images" : [
{ {
"filename" : "icon_dark2.png",
"idiom" : "universal", "idiom" : "universal",
"platform" : "ios", "platform" : "ios",
"size" : "1024x1024" "size" : "1024x1024"

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

View File

@ -19,6 +19,9 @@ struct ScanItemView: View {
private let translucentColour = Color(red: 0.6, green: 0.8, blue: 1, opacity: 0.4) private let translucentColour = Color(red: 0.6, green: 0.8, blue: 1, opacity: 0.4)
private let bgBottomColour = Color(red: 33/255, green: 90/255, blue: 1, opacity: 1)
private let bgTopColour = Color(red: 0/255, green: 130/255, blue: 1, opacity: 1)
init(_ scan: Scan) { init(_ scan: Scan) {
self.scan = scan self.scan = scan
self.images = scan.toSwiftUIImages() self.images = scan.toSwiftUIImages()
@ -53,27 +56,31 @@ struct ScanItemView: View {
.foregroundStyle(.white) .foregroundStyle(.white)
Spacer() Spacer()
Button { scan.copyImages() } label: { HStack {
Image(systemName: "doc.on.doc.fill").tint(.white) Button { scan.copyImages() } label: {
.padding(8) Image(systemName: "doc.on.doc.fill").tint(.white)
.background(translucentColour) .padding(8)
.clipShape(Circle()) .background(translucentColour)
.clipShape(Circle())
}
ShareLink(items: self.images, preview: { _ in SharePreview("Scan", image: self.images.first!)} ) {
Image(systemName: "square.and.arrow.up").tint(.white)
.padding(8)
.background(translucentColour)
.offset(y: -2)
.clipShape(Circle())
}
Button { delete() } label: {
Image(systemName: "xmark").bold().tint(.red)
.padding(8)
.background(translucentColour)
.clipShape(Circle())
}
} }
.shadow(radius: 6, y: 0)
ShareLink(items: self.images, preview: { _ in SharePreview("Scan", image: self.images.first!)} ) {
Image(systemName: "square.and.arrow.up").tint(.white)
.padding(8)
.background(translucentColour)
.offset(y: -2)
.clipShape(Circle())
}
Button { delete() } label: {
Image(systemName: "xmark").bold().tint(.red)
.padding(8)
.background(translucentColour)
.clipShape(Circle())
}
.contextMenu(menuItems: { .contextMenu(menuItems: {
Button("Delete All Scans", role: .destructive) { Button("Delete All Scans", role: .destructive) {
deleteAll() deleteAll()
@ -103,13 +110,14 @@ struct ScanItemView: View {
} }
.padding() .padding()
.background(Color(red: 0.4, green: 0.6, blue: 0.9, opacity: 0.8)) // .background(Color(red: 0.4, green: 0.6, blue: 0.9, opacity: 0.8))
.background(Gradient(colors: [bgTopColour, bgBottomColour]))
.clipShape(RoundedRectangle(cornerRadius: 35)) .clipShape(RoundedRectangle(cornerRadius: 35))
.padding(.horizontal, 12) .padding(.horizontal, 12)
} }
func delete() { func delete() {
withAnimation(.easeOut) { withAnimation(.spring) {
ctx.delete(scan) ctx.delete(scan)
try? ctx.save() try? ctx.save()
} }

BIN
icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

BIN
icon.pxd Normal file

Binary file not shown.

BIN
icon_dark.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

BIN
icon_dark2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB