mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Merge branch 'main' into ios-6.2
This commit is contained in:
@@ -150,8 +150,7 @@ struct AppAssets {
|
||||
static var masterFolderImage: IconImage {
|
||||
let image = NSImage(systemSymbolName: "folder", accessibilityDescription: nil)!
|
||||
let preferredColor = NSColor(named: "AccentColor")!
|
||||
let coloredImage = image.tinted(with: preferredColor)
|
||||
return IconImage(coloredImage, isSymbol: true, isBackgroundSupressed: true, preferredColor: preferredColor.cgColor)
|
||||
return IconImage(image, isSymbol: true, isBackgroundSupressed: true, preferredColor: preferredColor.cgColor)
|
||||
}
|
||||
|
||||
static var markAllAsReadImage: RSImage = {
|
||||
@@ -226,8 +225,7 @@ struct AppAssets {
|
||||
static var starredFeedImage: IconImage = {
|
||||
let image = NSImage(systemSymbolName: "star.fill", accessibilityDescription: nil)!
|
||||
let preferredColor = NSColor(named: "StarColor")!
|
||||
let coloredImage = image.tinted(with: preferredColor)
|
||||
return IconImage(coloredImage, isSymbol: true, isBackgroundSupressed: true, preferredColor: preferredColor.cgColor)
|
||||
return IconImage(image, isSymbol: true, isBackgroundSupressed: true, preferredColor: preferredColor.cgColor)
|
||||
}()
|
||||
|
||||
static var timelineSeparatorColor: NSColor = {
|
||||
@@ -245,15 +243,13 @@ struct AppAssets {
|
||||
static var todayFeedImage: IconImage = {
|
||||
let image = NSImage(systemSymbolName: "sun.max.fill", accessibilityDescription: nil)!
|
||||
let preferredColor = NSColor.orange
|
||||
let coloredImage = image.tinted(with: preferredColor)
|
||||
return IconImage(coloredImage, isSymbol: true, isBackgroundSupressed: true, preferredColor: preferredColor.cgColor)
|
||||
return IconImage(image, isSymbol: true, isBackgroundSupressed: true, preferredColor: preferredColor.cgColor)
|
||||
}()
|
||||
|
||||
static var unreadFeedImage: IconImage = {
|
||||
let image = NSImage(systemSymbolName: "largecircle.fill.circle", accessibilityDescription: nil)!
|
||||
let preferredColor = NSColor(named: "AccentColor")!
|
||||
let coloredImage = image.tinted(with: preferredColor)
|
||||
return IconImage(coloredImage, isSymbol: true, isBackgroundSupressed: true, preferredColor: preferredColor.cgColor)
|
||||
return IconImage(image, isSymbol: true, isBackgroundSupressed: true, preferredColor: preferredColor.cgColor)
|
||||
}()
|
||||
|
||||
static var swipeMarkReadImage: RSImage = {
|
||||
|
||||
@@ -14,6 +14,9 @@ final class IconView: NSView {
|
||||
didSet {
|
||||
if iconImage !== oldValue {
|
||||
imageView.image = iconImage?.image
|
||||
if let tintColor = iconImage?.preferredColor {
|
||||
imageView.contentTintColor = NSColor(cgColor: tintColor)
|
||||
}
|
||||
|
||||
if NSApplication.shared.effectiveAppearance.isDarkMode {
|
||||
if self.iconImage?.isDark ?? false {
|
||||
|
||||
@@ -143,18 +143,17 @@ private extension SidebarCell {
|
||||
var updatedIconImage = iconImage
|
||||
|
||||
if let iconImage = iconImage, iconImage.isSymbol {
|
||||
var tintColor: CGColor
|
||||
if backgroundStyle != .normal {
|
||||
let image = iconImage.image.tinted(with: .white)
|
||||
updatedIconImage = IconImage(image, isSymbol: iconImage.isSymbol, isBackgroundSupressed: iconImage.isBackgroundSupressed)
|
||||
tintColor = NSColor.white.cgColor
|
||||
} else {
|
||||
if let preferredColor = iconImage.preferredColor {
|
||||
let image = iconImage.image.tinted(with: NSColor(cgColor: preferredColor)!)
|
||||
updatedIconImage = IconImage(image, isSymbol: iconImage.isSymbol, isBackgroundSupressed: iconImage.isBackgroundSupressed)
|
||||
tintColor = preferredColor
|
||||
} else {
|
||||
let image = iconImage.image.tinted(with: .controlAccentColor)
|
||||
updatedIconImage = IconImage(image, isSymbol: iconImage.isSymbol, isBackgroundSupressed: iconImage.isBackgroundSupressed)
|
||||
tintColor = NSColor.controlAccentColor.cgColor
|
||||
}
|
||||
}
|
||||
updatedIconImage = IconImage(iconImage.image, isSymbol: iconImage.isSymbol, isBackgroundSupressed: iconImage.isBackgroundSupressed, preferredColor: tintColor)
|
||||
}
|
||||
|
||||
if let image = updatedIconImage {
|
||||
|
||||
@@ -809,6 +809,12 @@ extension TimelineViewController: NSTableViewDataSource {
|
||||
}
|
||||
return ArticlePasteboardWriter(article: article)
|
||||
}
|
||||
|
||||
func tableView(_ tableView: NSTableView, heightOfRow row: Int) -> CGFloat {
|
||||
// Keeping -[NSTableViewDelegate tableView:heightOfRow:] implemented fixes
|
||||
// an issue that the bottom inset of NSTableView disappears on macOS Monterey.
|
||||
return tableView.rowHeight
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - NSTableViewDelegate
|
||||
|
||||
Reference in New Issue
Block a user