diff --git a/Mac/AppAssets.swift b/Mac/AppAssets.swift index fa6851b01..4fd1a8804 100644 --- a/Mac/AppAssets.swift +++ b/Mac/AppAssets.swift @@ -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 = { diff --git a/Mac/MainWindow/IconView.swift b/Mac/MainWindow/IconView.swift index 43e4c8444..cc165d9de 100644 --- a/Mac/MainWindow/IconView.swift +++ b/Mac/MainWindow/IconView.swift @@ -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 { diff --git a/Mac/MainWindow/Sidebar/Cell/SidebarCell.swift b/Mac/MainWindow/Sidebar/Cell/SidebarCell.swift index ae0e2a12d..52b3804b4 100644 --- a/Mac/MainWindow/Sidebar/Cell/SidebarCell.swift +++ b/Mac/MainWindow/Sidebar/Cell/SidebarCell.swift @@ -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 { diff --git a/Mac/MainWindow/Timeline/TimelineViewController.swift b/Mac/MainWindow/Timeline/TimelineViewController.swift index 5c73f40bf..e3fdc0895 100644 --- a/Mac/MainWindow/Timeline/TimelineViewController.swift +++ b/Mac/MainWindow/Timeline/TimelineViewController.swift @@ -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 diff --git a/Mac/Resources/org.sparkle-project.InstallerLauncher.xpc/Contents/MacOS/Updater.app/Contents/Resources/tr.lproj/Sparkle.strings b/Mac/Resources/org.sparkle-project.InstallerLauncher.xpc/Contents/MacOS/Updater.app/Contents/Resources/tr.lproj/Sparkle.strings index 4def140e5..d96bec90e 100644 Binary files a/Mac/Resources/org.sparkle-project.InstallerLauncher.xpc/Contents/MacOS/Updater.app/Contents/Resources/tr.lproj/Sparkle.strings and b/Mac/Resources/org.sparkle-project.InstallerLauncher.xpc/Contents/MacOS/Updater.app/Contents/Resources/tr.lproj/Sparkle.strings differ