Remove a number of instances of the word master.

This commit is contained in:
Brent Simmons 2024-11-14 20:04:50 -08:00
parent c3098f14e1
commit 44fbcd85b6
11 changed files with 24 additions and 28 deletions

View File

@ -136,7 +136,7 @@ struct AppAssets {
return RSImage(named: "legacyArticleExtractorProgress4") return RSImage(named: "legacyArticleExtractorProgress4")
}() }()
static var masterFolderImage: IconImage { static var folderImage: IconImage {
let image = NSImage(systemSymbolName: "folder", accessibilityDescription: nil)! let image = NSImage(systemSymbolName: "folder", accessibilityDescription: nil)!
let preferredColor = NSColor(named: "AccentColor")! let preferredColor = NSColor(named: "AccentColor")!
let coloredImage = image.tinted(with: preferredColor) let coloredImage = image.tinted(with: preferredColor)

View File

@ -37,6 +37,6 @@ extension Feed: SmallIconProvider {
extension Folder: SmallIconProvider { extension Folder: SmallIconProvider {
var smallIcon: IconImage? { var smallIcon: IconImage? {
AppAssets.masterFolderImage AppAssets.folderImage
} }
} }

View File

@ -149,14 +149,10 @@ struct AppAssets {
return UIImage(systemName: "arrowtriangle.up.circle")! return UIImage(systemName: "arrowtriangle.up.circle")!
}() }()
static var masterFolderImage: IconImage = { static var folderImage: IconImage = {
return IconImage(UIImage(systemName: "folder.fill")!, isSymbol: true, isBackgroundSupressed: true, preferredColor: AppAssets.secondaryAccentColor.cgColor) return IconImage(UIImage(systemName: "folder.fill")!, isSymbol: true, isBackgroundSupressed: true, preferredColor: AppAssets.secondaryAccentColor.cgColor)
}() }()
static var masterFolderImageNonIcon: UIImage = {
return UIImage(systemName: "folder.fill")!.withRenderingMode(.alwaysOriginal).withTintColor(.secondaryLabel)
}()
static var moreImage: UIImage = { static var moreImage: UIImage = {
return UIImage(systemName: "ellipsis.circle")! return UIImage(systemName: "ellipsis.circle")!
}() }()

View File

@ -9,7 +9,7 @@
import UIKit import UIKit
import RSCore import RSCore
struct MasterTimelineDefaultCellLayout: MasterTimelineCellLayout { struct MasterTimelineDefaultCellLayout: TimelineCellLayout {
static let cellPadding = UIEdgeInsets(top: 12, left: 8, bottom: 12, right: 20) static let cellPadding = UIEdgeInsets(top: 12, left: 8, bottom: 12, right: 20)

View File

@ -153,9 +153,9 @@ private extension MasterTimelineTableViewCell {
addSubviewAtInit(starView, hidden: true) addSubviewAtInit(starView, hidden: true)
} }
func updatedLayout(width: CGFloat) -> MasterTimelineCellLayout { func updatedLayout(width: CGFloat) -> TimelineCellLayout {
if UIApplication.shared.preferredContentSizeCategory.isAccessibilityCategory { if UIApplication.shared.preferredContentSizeCategory.isAccessibilityCategory {
return MasterTimelineAccessibilityCellLayout(width: width, insets: safeAreaInsets, cellData: cellData) return TimelineAccessibilityCellLayout(width: width, insets: safeAreaInsets, cellData: cellData)
} else { } else {
return MasterTimelineDefaultCellLayout(width: width, insets: safeAreaInsets, cellData: cellData) return MasterTimelineDefaultCellLayout(width: width, insets: safeAreaInsets, cellData: cellData)
} }

View File

@ -1,5 +1,5 @@
// //
// MasterTimelineAccessibilityCellLayout.swift // TimelineAccessibilityCellLayout.swift
// NetNewsWire-iOS // NetNewsWire-iOS
// //
// Created by Maurice Parker on 4/29/19. // Created by Maurice Parker on 4/29/19.
@ -9,7 +9,7 @@
import UIKit import UIKit
import RSCore import RSCore
struct MasterTimelineAccessibilityCellLayout: MasterTimelineCellLayout { struct TimelineAccessibilityCellLayout: TimelineCellLayout {
let height: CGFloat let height: CGFloat
let unreadIndicatorRect: CGRect let unreadIndicatorRect: CGRect
@ -27,15 +27,15 @@ struct MasterTimelineAccessibilityCellLayout: MasterTimelineCellLayout {
currentPoint.y = MasterTimelineDefaultCellLayout.cellPadding.top currentPoint.y = MasterTimelineDefaultCellLayout.cellPadding.top
// Unread Indicator and Star // Unread Indicator and Star
self.unreadIndicatorRect = MasterTimelineAccessibilityCellLayout.rectForUnreadIndicator(currentPoint) self.unreadIndicatorRect = TimelineAccessibilityCellLayout.rectForUnreadIndicator(currentPoint)
self.starRect = MasterTimelineAccessibilityCellLayout.rectForStar(currentPoint) self.starRect = TimelineAccessibilityCellLayout.rectForStar(currentPoint)
// Start the point at the beginning position of the main block // Start the point at the beginning position of the main block
currentPoint.x += MasterTimelineDefaultCellLayout.unreadCircleDimension + MasterTimelineDefaultCellLayout.unreadCircleMarginRight currentPoint.x += MasterTimelineDefaultCellLayout.unreadCircleDimension + MasterTimelineDefaultCellLayout.unreadCircleMarginRight
// Icon Image // Icon Image
if cellData.showIcon { if cellData.showIcon {
self.iconImageRect = MasterTimelineAccessibilityCellLayout.rectForIconView(currentPoint, iconSize: cellData.iconSize) self.iconImageRect = TimelineAccessibilityCellLayout.rectForIconView(currentPoint, iconSize: cellData.iconSize)
currentPoint.y = self.iconImageRect.maxY currentPoint.y = self.iconImageRect.maxY
} else { } else {
self.iconImageRect = CGRect.zero self.iconImageRect = CGRect.zero
@ -44,26 +44,26 @@ struct MasterTimelineAccessibilityCellLayout: MasterTimelineCellLayout {
let textAreaWidth = width - (currentPoint.x + MasterTimelineDefaultCellLayout.cellPadding.right + insets.right) let textAreaWidth = width - (currentPoint.x + MasterTimelineDefaultCellLayout.cellPadding.right + insets.right)
// Title Text Block // Title Text Block
let (titleRect, numberOfLinesForTitle) = MasterTimelineAccessibilityCellLayout.rectForTitle(cellData, currentPoint, textAreaWidth) let (titleRect, numberOfLinesForTitle) = TimelineAccessibilityCellLayout.rectForTitle(cellData, currentPoint, textAreaWidth)
self.titleRect = titleRect self.titleRect = titleRect
// Summary Text Block // Summary Text Block
if self.titleRect != CGRect.zero { if self.titleRect != CGRect.zero {
currentPoint.y = self.titleRect.maxY + MasterTimelineDefaultCellLayout.titleBottomMargin currentPoint.y = self.titleRect.maxY + MasterTimelineDefaultCellLayout.titleBottomMargin
} }
self.summaryRect = MasterTimelineAccessibilityCellLayout.rectForSummary(cellData, currentPoint, textAreaWidth, numberOfLinesForTitle) self.summaryRect = TimelineAccessibilityCellLayout.rectForSummary(cellData, currentPoint, textAreaWidth, numberOfLinesForTitle)
currentPoint.y = [self.titleRect, self.summaryRect].maxY() currentPoint.y = [self.titleRect, self.summaryRect].maxY()
if cellData.showFeedName != .none { if cellData.showFeedName != .none {
self.feedNameRect = MasterTimelineAccessibilityCellLayout.rectForFeedName(cellData, currentPoint, textAreaWidth) self.feedNameRect = TimelineAccessibilityCellLayout.rectForFeedName(cellData, currentPoint, textAreaWidth)
currentPoint.y = self.feedNameRect.maxY currentPoint.y = self.feedNameRect.maxY
} else { } else {
self.feedNameRect = CGRect.zero self.feedNameRect = CGRect.zero
} }
// Feed Name and Pub Date // Feed Name and Pub Date
self.dateRect = MasterTimelineAccessibilityCellLayout.rectForDate(cellData, currentPoint, textAreaWidth) self.dateRect = TimelineAccessibilityCellLayout.rectForDate(cellData, currentPoint, textAreaWidth)
self.height = self.dateRect.maxY + MasterTimelineDefaultCellLayout.cellPadding.bottom self.height = self.dateRect.maxY + MasterTimelineDefaultCellLayout.cellPadding.bottom
@ -73,7 +73,7 @@ struct MasterTimelineAccessibilityCellLayout: MasterTimelineCellLayout {
// MARK: - Calculate Rects // MARK: - Calculate Rects
private extension MasterTimelineAccessibilityCellLayout { private extension TimelineAccessibilityCellLayout {
static func rectForDate(_ cellData: MasterTimelineCellData, _ point: CGPoint, _ textAreaWidth: CGFloat) -> CGRect { static func rectForDate(_ cellData: MasterTimelineCellData, _ point: CGPoint, _ textAreaWidth: CGFloat) -> CGRect {

View File

@ -1,5 +1,5 @@
// //
// MasterTimelineCellLayout.swift // TimelineCellLayout.swift
// NetNewsWire-iOS // NetNewsWire-iOS
// //
// Created by Maurice Parker on 4/29/19. // Created by Maurice Parker on 4/29/19.
@ -8,7 +8,7 @@
import UIKit import UIKit
protocol MasterTimelineCellLayout { protocol TimelineCellLayout {
var height: CGFloat {get} var height: CGFloat {get}
var unreadIndicatorRect: CGRect {get} var unreadIndicatorRect: CGRect {get}
@ -21,7 +21,7 @@ protocol MasterTimelineCellLayout {
} }
extension MasterTimelineCellLayout { extension TimelineCellLayout {
static func rectForUnreadIndicator(_ point: CGPoint) -> CGRect { static func rectForUnreadIndicator(_ point: CGPoint) -> CGRect {
var r = CGRect.zero var r = CGRect.zero

View File

@ -549,7 +549,7 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner
let prototypeCellData = MasterTimelineCellData(article: prototypeArticle, showFeedName: .feed, feedName: "Prototype Feed Name", byline: nil, iconImage: nil, showIcon: false, featuredImage: nil, numberOfLines: numberOfTextLines, iconSize: iconSize) let prototypeCellData = MasterTimelineCellData(article: prototypeArticle, showFeedName: .feed, feedName: "Prototype Feed Name", byline: nil, iconImage: nil, showIcon: false, featuredImage: nil, numberOfLines: numberOfTextLines, iconSize: iconSize)
if UIApplication.shared.preferredContentSizeCategory.isAccessibilityCategory { if UIApplication.shared.preferredContentSizeCategory.isAccessibilityCategory {
let layout = MasterTimelineAccessibilityCellLayout(width: tableView.bounds.width, insets: tableView.safeAreaInsets, cellData: prototypeCellData) let layout = TimelineAccessibilityCellLayout(width: tableView.bounds.width, insets: tableView.safeAreaInsets, cellData: prototypeCellData)
tableView.estimatedRowHeight = layout.height tableView.estimatedRowHeight = layout.height
} else { } else {
let layout = MasterTimelineDefaultCellLayout(width: tableView.bounds.width, insets: tableView.safeAreaInsets, cellData: prototypeCellData) let layout = MasterTimelineDefaultCellLayout(width: tableView.bounds.width, insets: tableView.safeAreaInsets, cellData: prototypeCellData)

View File

@ -23,7 +23,7 @@ class TimelinePreviewTableViewController: UIViewController, UITableViewDelegate,
func heightFor(width: CGFloat) -> CGFloat { func heightFor(width: CGFloat) -> CGFloat {
if UIApplication.shared.preferredContentSizeCategory.isAccessibilityCategory { if UIApplication.shared.preferredContentSizeCategory.isAccessibilityCategory {
let layout = MasterTimelineAccessibilityCellLayout(width: width, insets: tableView.safeAreaInsets, cellData: prototypeCellData) let layout = TimelineAccessibilityCellLayout(width: width, insets: tableView.safeAreaInsets, cellData: prototypeCellData)
return layout.height return layout.height
} else { } else {
let layout = MasterTimelineDefaultCellLayout(width: width, insets: tableView.safeAreaInsets, cellData: prototypeCellData) let layout = MasterTimelineDefaultCellLayout(width: width, insets: tableView.safeAreaInsets, cellData: prototypeCellData)

View File

@ -48,7 +48,7 @@ class ShareFolderPickerController: UITableViewController {
if let account = container as? ExtensionAccount { if let account = container as? ExtensionAccount {
cell.icon.image = AppAssets.image(for: account.type) cell.icon.image = AppAssets.image(for: account.type)
} else { } else {
cell.icon.image = AppAssets.masterFolderImage.image cell.icon.image = AppAssets.folderImage.image
} }
cell.label?.text = container?.name ?? "" cell.label?.text = container?.name ?? ""

View File

@ -1,5 +1,5 @@
// //
// MasterTimelineLabel.swift // NonIntrinsicLabel.swift
// NetNewsWire-iOS // NetNewsWire-iOS
// //
// Created by Maurice Parker on 4/22/19. // Created by Maurice Parker on 4/22/19.