slight design changes and finally added an app icon woo!
This commit is contained in:
parent
47bc5d1b47
commit
6ec348841c
@ -1,6 +1,7 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "icon_dark2.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "1024x1024"
|
||||
|
BIN
JustScanIt/Assets.xcassets/AppIcon.appiconset/icon_dark2.png
Normal file
BIN
JustScanIt/Assets.xcassets/AppIcon.appiconset/icon_dark2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 118 KiB |
@ -19,6 +19,9 @@ struct ScanItemView: View {
|
||||
|
||||
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) {
|
||||
self.scan = scan
|
||||
self.images = scan.toSwiftUIImages()
|
||||
@ -53,27 +56,31 @@ struct ScanItemView: View {
|
||||
.foregroundStyle(.white)
|
||||
Spacer()
|
||||
|
||||
Button { scan.copyImages() } label: {
|
||||
Image(systemName: "doc.on.doc.fill").tint(.white)
|
||||
.padding(8)
|
||||
.background(translucentColour)
|
||||
.clipShape(Circle())
|
||||
}
|
||||
HStack {
|
||||
Button { scan.copyImages() } label: {
|
||||
Image(systemName: "doc.on.doc.fill").tint(.white)
|
||||
.padding(8)
|
||||
.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())
|
||||
}
|
||||
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())
|
||||
Button { delete() } label: {
|
||||
Image(systemName: "xmark").bold().tint(.red)
|
||||
.padding(8)
|
||||
.background(translucentColour)
|
||||
.clipShape(Circle())
|
||||
}
|
||||
}
|
||||
.shadow(radius: 6, y: 0)
|
||||
|
||||
.contextMenu(menuItems: {
|
||||
Button("Delete All Scans", role: .destructive) {
|
||||
deleteAll()
|
||||
@ -103,13 +110,14 @@ struct ScanItemView: View {
|
||||
|
||||
}
|
||||
.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))
|
||||
.padding(.horizontal, 12)
|
||||
}
|
||||
|
||||
func delete() {
|
||||
withAnimation(.easeOut) {
|
||||
withAnimation(.spring) {
|
||||
ctx.delete(scan)
|
||||
try? ctx.save()
|
||||
}
|
||||
|
BIN
icon_dark.png
Normal file
BIN
icon_dark.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 76 KiB |
BIN
icon_dark2.png
Normal file
BIN
icon_dark2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 118 KiB |
Loading…
x
Reference in New Issue
Block a user