Change mark all as read image to be a PNG, since SwiftUI on AppKit sucks at handling vector resources

This commit is contained in:
Maurice Parker 2020-07-19 17:44:41 -05:00
parent 88745755b6
commit 4446fa0ca9
6 changed files with 26 additions and 23 deletions

View File

@ -167,10 +167,10 @@ struct AppAssets {
return Image("MarkAllAsRead")
}()
static var markAllAsReadImagePDF: Image = {
return Image("MarkAllAsReadPDF")
static var markAllAsReadImagePNG: Image = {
return Image("MarkAllAsReadPNG")
}()
static var nextUnreadArticleImage: Image = {
return Image(systemName: "chevron.down.circle")
}()

View File

@ -1,16 +0,0 @@
{
"images" : [
{
"filename" : "MarkAllAsReadPDF.pdf",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true,
"template-rendering-intent" : "template"
}
}

View File

@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "mark-all-as-read.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -94,10 +94,8 @@ struct SceneNavigationView: View {
Button {
sceneModel.markAllAsRead()
} label: {
AppAssets.markAllAsReadImagePDF
.resizable()
.scaledToFit()
.frame(width: 20, height: 20, alignment: .center)
AppAssets.markAllAsReadImagePNG
.offset(y: 7)
}
.disabled(sceneModel.markAllAsReadButtonState == nil)
.help("Mark All as Read")