diff --git a/JustScanIt/Assets.xcassets/AppIcon.appiconset/Contents.json b/JustScanIt/Assets.xcassets/AppIcon.appiconset/Contents.json index 13613e3..7efa25a 100644 --- a/JustScanIt/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/JustScanIt/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,6 +1,7 @@ { "images" : [ { + "filename" : "icon_dark2.png", "idiom" : "universal", "platform" : "ios", "size" : "1024x1024" diff --git a/JustScanIt/Assets.xcassets/AppIcon.appiconset/icon_dark2.png b/JustScanIt/Assets.xcassets/AppIcon.appiconset/icon_dark2.png new file mode 100644 index 0000000..389f18a Binary files /dev/null and b/JustScanIt/Assets.xcassets/AppIcon.appiconset/icon_dark2.png differ diff --git a/JustScanIt/View/ScanItemView.swift b/JustScanIt/View/ScanItemView.swift index 9cc4ced..f1534bf 100644 --- a/JustScanIt/View/ScanItemView.swift +++ b/JustScanIt/View/ScanItemView.swift @@ -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()) + } + + 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: { 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() } diff --git a/icon.png b/icon.png new file mode 100644 index 0000000..fd83dbf Binary files /dev/null and b/icon.png differ diff --git a/icon.pxd b/icon.pxd new file mode 100644 index 0000000..0b8542a Binary files /dev/null and b/icon.pxd differ diff --git a/icon_dark.png b/icon_dark.png new file mode 100644 index 0000000..966fe90 Binary files /dev/null and b/icon_dark.png differ diff --git a/icon_dark2.png b/icon_dark2.png new file mode 100644 index 0000000..389f18a Binary files /dev/null and b/icon_dark2.png differ