Use glyphs from SF Symbols for table row swipe actions
(Thin font weight.)
This commit is contained in:
parent
c771bd651c
commit
4b1a19360c
|
@ -94,4 +94,20 @@ struct AppAssets {
|
|||
return RSImage(named: NSImage.smartBadgeTemplateName)!
|
||||
}()
|
||||
|
||||
static var swipeMarkReadImage: RSImage = {
|
||||
return RSImage(named: "swipeMarkRead")!
|
||||
}()
|
||||
|
||||
static var swipeMarkUnreadImage: RSImage = {
|
||||
return RSImage(named: "swipeMarkUnread")!
|
||||
}()
|
||||
|
||||
static var swipeMarkStarredImage: RSImage = {
|
||||
return RSImage(named: "swipeMarkStarred")!
|
||||
}()
|
||||
|
||||
static var swipeMarkUnstarredImage: RSImage = {
|
||||
return RSImage(named: "swipeMarkUnstarred")!
|
||||
}()
|
||||
|
||||
}
|
||||
|
|
|
@ -779,19 +779,19 @@ extension TimelineViewController: NSTableViewDelegate {
|
|||
|
||||
switch edge {
|
||||
case .leading:
|
||||
let title = article.status.read ? NSLocalizedString("Mark Unread", comment: "mark unread") : NSLocalizedString("Mark Read", comment: "mark read")
|
||||
let action = NSTableViewRowAction(style: .regular, title: title) { (action, row) in
|
||||
let action = NSTableViewRowAction(style: .regular, title: "") { (action, row) in
|
||||
self.toggleArticleRead(article);
|
||||
tableView.rowActionsVisible = false
|
||||
}
|
||||
action.image = article.status.read ? AppAssets.swipeMarkUnreadImage : AppAssets.swipeMarkReadImage
|
||||
return [action]
|
||||
|
||||
case .trailing:
|
||||
let title = article.status.starred ? NSLocalizedString("Mark Unstarred", comment: "mark unstarred") : NSLocalizedString("Mark Starred", comment: "mark starred")
|
||||
let action = NSTableViewRowAction(style: .regular, title: title) { (action, row) in
|
||||
let action = NSTableViewRowAction(style: .regular, title: "") { (action, row) in
|
||||
self.toggleArticleStarred(article);
|
||||
tableView.rowActionsVisible = false
|
||||
}
|
||||
action.image = article.status.starred ? AppAssets.swipeMarkUnstarredImage : AppAssets.swipeMarkStarredImage
|
||||
return [action]
|
||||
|
||||
@unknown default:
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
24
Mac/Resources/Assets.xcassets/Swipe Images/swipeMarkRead.imageset/Contents.json
vendored
Normal file
24
Mac/Resources/Assets.xcassets/Swipe Images/swipeMarkRead.imageset/Contents.json
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "checkmark.circle.pdf",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
},
|
||||
"properties" : {
|
||||
"template-rendering-intent" : "template"
|
||||
}
|
||||
}
|
BIN
Mac/Resources/Assets.xcassets/Swipe Images/swipeMarkRead.imageset/checkmark.circle.pdf
vendored
Normal file
BIN
Mac/Resources/Assets.xcassets/Swipe Images/swipeMarkRead.imageset/checkmark.circle.pdf
vendored
Normal file
Binary file not shown.
21
Mac/Resources/Assets.xcassets/Swipe Images/swipeMarkStarred.imageset/Contents.json
vendored
Normal file
21
Mac/Resources/Assets.xcassets/Swipe Images/swipeMarkStarred.imageset/Contents.json
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "star.fill.pdf",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
BIN
Mac/Resources/Assets.xcassets/Swipe Images/swipeMarkStarred.imageset/star.fill.pdf
vendored
Normal file
BIN
Mac/Resources/Assets.xcassets/Swipe Images/swipeMarkStarred.imageset/star.fill.pdf
vendored
Normal file
Binary file not shown.
24
Mac/Resources/Assets.xcassets/Swipe Images/swipeMarkUnread.imageset/Contents.json
vendored
Normal file
24
Mac/Resources/Assets.xcassets/Swipe Images/swipeMarkUnread.imageset/Contents.json
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "circle.fill.pdf",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
},
|
||||
"properties" : {
|
||||
"template-rendering-intent" : "template"
|
||||
}
|
||||
}
|
BIN
Mac/Resources/Assets.xcassets/Swipe Images/swipeMarkUnread.imageset/circle.fill.pdf
vendored
Normal file
BIN
Mac/Resources/Assets.xcassets/Swipe Images/swipeMarkUnread.imageset/circle.fill.pdf
vendored
Normal file
Binary file not shown.
21
Mac/Resources/Assets.xcassets/Swipe Images/swipeMarkUnstarred.imageset/Contents.json
vendored
Normal file
21
Mac/Resources/Assets.xcassets/Swipe Images/swipeMarkUnstarred.imageset/Contents.json
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "star.pdf",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
BIN
Mac/Resources/Assets.xcassets/Swipe Images/swipeMarkUnstarred.imageset/star.pdf
vendored
Normal file
BIN
Mac/Resources/Assets.xcassets/Swipe Images/swipeMarkUnstarred.imageset/star.pdf
vendored
Normal file
Binary file not shown.
Loading…
Reference in New Issue