From 42506ce427dadc1faf5b6ae726a7fd72b89c9f19 Mon Sep 17 00:00:00 2001 From: Stuart Breckenridge Date: Tue, 15 Dec 2020 15:43:19 +0800 Subject: [PATCH 1/2] package --- .../xcshareddata/swiftpm/Package.resolved | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/NetNewsWire.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/NetNewsWire.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 0eb5dba64..8a786b167 100644 --- a/NetNewsWire.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/NetNewsWire.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -51,8 +51,8 @@ "repositoryURL": "https://github.com/Ranchero-Software/RSCore.git", "state": { "branch": null, - "revision": "1017fe09c61bd9f75aa713381894aef979c994ef", - "version": "1.0.0-beta6" + "revision": "dce76a4070ed24f148bb1673c308962dbdbf01ef", + "version": "1.0.0-beta9" } }, { @@ -96,7 +96,7 @@ "repositoryURL": "https://github.com/Ranchero-Software/Sparkle-Binary.git", "state": { "branch": "main", - "revision": "6b6d1d4b4864af7b56dd6f2ba148d752724e80d7", + "revision": "67cd26321bdf4e77954cf6de7d9e6a20544f2030", "version": null } }, From ef8035bcdfcb51055c76998717cca4741d7319bf Mon Sep 17 00:00:00 2001 From: Stuart Breckenridge Date: Tue, 15 Dec 2020 19:56:50 +0800 Subject: [PATCH 2/2] Widget Changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Feed favicons now sized to match the height of the article row • Rounded font removed in lieu of default font • accentColor corrected for dark mode • Fixes an ~3pt alignment issue on the Today widget’s left VStack • No content views have been updated with bigger text and explainers • The small summary widget has been disabled --- .../AccentColor.colorset/Contents.json | 8 ++-- Widget/Resources/Localized.swift | 14 ++++-- Widget/Resources/en.lproj/Localizable.strings | 11 +++-- Widget/Shared Views/ArticleItemView.swift | 2 +- Widget/Widget Views/StarredWidget.swift | 43 ++++++++---------- Widget/Widget Views/TodayWidget.swift | 44 ++++++++----------- Widget/Widget Views/UnreadWidget.swift | 38 +++++++--------- Widget/WidgetBundle.swift | 1 - 8 files changed, 76 insertions(+), 85 deletions(-) diff --git a/Widget/Assets.xcassets/AccentColor.colorset/Contents.json b/Widget/Assets.xcassets/AccentColor.colorset/Contents.json index bf3d625ad..3e6643afa 100644 --- a/Widget/Assets.xcassets/AccentColor.colorset/Contents.json +++ b/Widget/Assets.xcassets/AccentColor.colorset/Contents.json @@ -20,12 +20,12 @@ } ], "color" : { - "color-space" : "srgb", + "color-space" : "display-p3", "components" : { "alpha" : "1.000", - "blue" : "0.945", - "green" : "0.502", - "red" : "0.176" + "blue" : "0.929", + "green" : "0.611", + "red" : "0.426" } }, "idiom" : "universal" diff --git a/Widget/Resources/Localized.swift b/Widget/Resources/Localized.swift index 6590ab301..f8a05b221 100644 --- a/Widget/Resources/Localized.swift +++ b/Widget/Resources/Localized.swift @@ -22,20 +22,24 @@ internal enum L10n { internal static let starred = L10n.tr("Localizable", "Starred") /// A sneak peek at your starred articles. internal static let starredWidgetDescription = L10n.tr("Localizable", "Starred_Widget_Description") - /// You've not starred any artices. + /// When you mark articles as Starred, they'll appear here. internal static let starredWidgetNoItems = L10n.tr("Localizable", "Starred_Widget_NoItems") + /// Starred + internal static let starredWidgetNoItemsTitle = L10n.tr("Localizable", "Starred_Widget_NoItemsTitle") /// Your Starred Articles internal static let starredWidgetTitle = L10n.tr("Localizable", "Starred_Widget_Title") /// Plural format key: "%#@starred_count@" internal static func starredCount(_ p1: Int) -> String { return L10n.tr("Localizable", "StarredCount", p1) } - /// Today + /// Today internal static let today = L10n.tr("Localizable", "Today") /// A sneak peek at recently published unread articles. internal static let todayWidgetDescription = L10n.tr("Localizable", "Today_Widget_Description") - /// There are no recent articles to read. + /// There are no recent unread articles left to read. internal static let todayWidgetNoItems = L10n.tr("Localizable", "Today_Widget_NoItems") + /// Today + internal static let todayWidgetNoItemsTitle = L10n.tr("Localizable", "Today_Widget_NoItemsTitle") /// Your Today Articles internal static let todayWidgetTitle = L10n.tr("Localizable", "Today_Widget_Title") /// Plural format key: "%#@today_count@" @@ -46,8 +50,10 @@ internal enum L10n { internal static let unread = L10n.tr("Localizable", "Unread") /// A sneak peek at your unread articles. internal static let unreadWidgetDescription = L10n.tr("Localizable", "Unread_Widget_Description") - /// There's nothing to read right now. + /// There are no unread articles left to read. internal static let unreadWidgetNoItems = L10n.tr("Localizable", "Unread_Widget_NoItems") + /// Unread + internal static let unreadWidgetNoItemsTitle = L10n.tr("Localizable", "Unread_Widget_NoItemsTitle") /// Your Unread Articles internal static let unreadWidgetTitle = L10n.tr("Localizable", "Unread_Widget_Title") /// Plural format key: "%#@unread_count@" diff --git a/Widget/Resources/en.lproj/Localizable.strings b/Widget/Resources/en.lproj/Localizable.strings index ca6a31ae4..fed487392 100644 --- a/Widget/Resources/en.lproj/Localizable.strings +++ b/Widget/Resources/en.lproj/Localizable.strings @@ -20,15 +20,18 @@ "SmartFeedSummary_Widget_Description" = "Your smart feeds, summarized."; /* Unread Widget */ -"Unread_Widget_NoItems" = "There's nothing to read right now."; +"Unread_Widget_NoItemsTitle" = "Unread"; +"Unread_Widget_NoItems" = "There are no unread articles left to read."; /* Today Widget */ -"Today_Widget_NoItems" = "There are no recent articles to read."; +"Today_Widget_NoItemsTitle" = "Today"; +"Today_Widget_NoItems" = "There are no recent unread articles left to read."; /* Starred Widget */ -"Starred_Widget_NoItems" = "You've not starred any artices."; +"Starred_Widget_NoItemsTitle" = "Starred"; +"Starred_Widget_NoItems" = "When you mark articles as Starred, they'll appear here."; /* Smart Feed Summary Widget */ "Unread" = "Unread"; -"Today" = "Today"; +"Today" = "Today "; "Starred" = "Starred"; diff --git a/Widget/Shared Views/ArticleItemView.swift b/Widget/Shared Views/ArticleItemView.swift index 25060828e..e6d673215 100644 --- a/Widget/Shared Views/ArticleItemView.swift +++ b/Widget/Shared Views/ArticleItemView.swift @@ -19,7 +19,7 @@ struct ArticleItemView: View { // Feed Icon Image(uiImage: thumbnail(article.feedIcon)) .resizable() - .frame(width: 25, height: 25) + .frame(width: 30, height: 30) .cornerRadius(4) // Title and Feed Name diff --git a/Widget/Widget Views/StarredWidget.swift b/Widget/Widget Views/StarredWidget.swift index 24202acbd..919d2819e 100644 --- a/Widget/Widget Views/StarredWidget.swift +++ b/Widget/Widget Views/StarredWidget.swift @@ -26,7 +26,7 @@ struct StarredWidgetView : View { VStack(alignment: .leading) { starredImage Spacer() - Text(L10n.localizedCount(entry.widgetData.currentStarredCount)).bold().font(Font.system(.callout, design: .rounded)).minimumScaleFactor(0.5).lineLimit(1) + Text(L10n.localizedCount(entry.widgetData.currentStarredCount)).bold().font(.callout).minimumScaleFactor(0.5).lineLimit(1) Text(L10n.starred.lowercased()).bold().font(Font.system(.footnote).lowercaseSmallCaps()).minimumScaleFactor(0.5).lineLimit(1) } .frame(width: metrics.size.width * 0.15) @@ -63,13 +63,6 @@ struct StarredWidgetView : View { .foregroundColor(.yellow) } - var nnwImage: some View { - Image("CornerIcon") - .resizable() - .frame(width: 25, height: 25, alignment: .center) - .cornerRadius(4) - } - func maxCount() -> Int { if family == .systemLarge { return entry.widgetData.currentStarredCount > 7 ? 7 : entry.widgetData.currentStarredCount @@ -78,24 +71,26 @@ struct StarredWidgetView : View { } var inboxZero: some View { - VStack { + VStack(alignment: .center) { Spacer() - Image(systemName: "checkmark.circle") - .foregroundColor(.accentColor) - .font(.title) - - Spacer() - HStack { - Image("CornerIcon") - .resizable() - .frame(width: 15, height: 15, alignment: .center) - .cornerRadius(4) + Image(systemName: "star.fill") + .resizable() + .aspectRatio(contentMode: .fit) + .frame(width: 30) + .foregroundColor(.yellow) - Text(L10n.starredWidgetNoItems) - .font(.caption2) - .foregroundColor(.gray) - } - }.padding() + + Text(L10n.starredWidgetNoItemsTitle) + .font(.headline) + .foregroundColor(.primary) + + Text(L10n.starredWidgetNoItems) + .font(.caption) + .foregroundColor(.gray) + Spacer() + } + .multilineTextAlignment(.center) + .padding() } } diff --git a/Widget/Widget Views/TodayWidget.swift b/Widget/Widget Views/TodayWidget.swift index 0eaad4636..653c35d14 100644 --- a/Widget/Widget Views/TodayWidget.swift +++ b/Widget/Widget Views/TodayWidget.swift @@ -26,13 +26,12 @@ struct TodayWidgetView : View { VStack(alignment: .leading) { todayImage Spacer() - Text(L10n.localizedCount(entry.widgetData.currentTodayCount)).bold().font(Font.system(.callout, design: .rounded)).minimumScaleFactor(0.5).lineLimit(1) + Text(L10n.localizedCount(entry.widgetData.currentTodayCount)).bold().font(.callout).minimumScaleFactor(0.5).lineLimit(1) Text(L10n.today.lowercased()).bold().font(Font.system(.footnote).lowercaseSmallCaps()).minimumScaleFactor(0.5).lineLimit(1) } .frame(width: metrics.size.width * 0.15) .padding(.trailing, 4) - VStack(alignment:.leading, spacing: 0) { ForEach(0.. Int { if family == .systemLarge { return entry.widgetData.todayArticles.count > 7 ? 7 : entry.widgetData.todayArticles.count @@ -78,24 +70,26 @@ struct TodayWidgetView : View { } var inboxZero: some View { - VStack { + VStack(alignment: .center) { Spacer() - Image(systemName: "checkmark.circle") - .foregroundColor(.accentColor) - .font(.title) - - Spacer() - HStack { - Image("CornerIcon") - .resizable() - .frame(width: 15, height: 15, alignment: .center) - .cornerRadius(4) + Image(systemName: "sun.max.fill") + .resizable() + .aspectRatio(contentMode: .fit) + .frame(width: 30) + .foregroundColor(.orange) - Text(L10n.todayWidgetNoItems) - .font(.caption2) - .foregroundColor(.gray) - } - }.padding() + + Text(L10n.todayWidgetNoItemsTitle) + .font(.headline) + .foregroundColor(.primary) + + Text(L10n.todayWidgetNoItems) + .font(.caption) + .foregroundColor(.gray) + Spacer() + } + .multilineTextAlignment(.center) + .padding() } } diff --git a/Widget/Widget Views/UnreadWidget.swift b/Widget/Widget Views/UnreadWidget.swift index 276bd11a2..21f42319d 100644 --- a/Widget/Widget Views/UnreadWidget.swift +++ b/Widget/Widget Views/UnreadWidget.swift @@ -26,7 +26,7 @@ struct UnreadWidgetView : View { VStack(alignment: .leading) { unreadImage Spacer() - Text(L10n.localizedCount(entry.widgetData.currentUnreadCount)).bold().font(Font.system(.callout, design: .rounded)).minimumScaleFactor(0.5).lineLimit(1) + Text(L10n.localizedCount(entry.widgetData.currentUnreadCount)).bold().font(.callout).minimumScaleFactor(0.5).lineLimit(1) Text(L10n.unread.lowercased()).bold().font(Font.system(.footnote).lowercaseSmallCaps()).minimumScaleFactor(0.5).lineLimit(1) } .frame(width: metrics.size.width * 0.15) @@ -62,13 +62,6 @@ struct UnreadWidgetView : View { .foregroundColor(.accentColor) } - var nnwImage: some View { - Image("CornerIcon") - .resizable() - .frame(width: 25, height: 25, alignment: .center) - .cornerRadius(4) - } - func maxCount() -> Int { if family == .systemLarge { return entry.widgetData.unreadArticles.count > 7 ? 7 : entry.widgetData.unreadArticles.count @@ -77,24 +70,25 @@ struct UnreadWidgetView : View { } var inboxZero: some View { - VStack { + VStack(alignment: .center) { Spacer() - Image(systemName: "checkmark.circle") + Image(systemName: "largecircle.fill.circle") + .resizable() + .aspectRatio(contentMode: .fit) .foregroundColor(.accentColor) - .font(.title) + .frame(width: 30) + + Text(L10n.unreadWidgetNoItemsTitle) + .font(.headline) + .foregroundColor(.primary) + Text(L10n.unreadWidgetNoItems) + .font(.caption) + .foregroundColor(.gray) Spacer() - HStack { - Image("CornerIcon") - .resizable() - .frame(width: 15, height: 15, alignment: .center) - .cornerRadius(4) - - Text(L10n.unreadWidgetNoItems) - .font(.caption2) - .foregroundColor(.gray) - } - }.padding() + } + .multilineTextAlignment(.center) + .padding() } } diff --git a/Widget/WidgetBundle.swift b/Widget/WidgetBundle.swift index 84f531f18..f5060ed7e 100644 --- a/Widget/WidgetBundle.swift +++ b/Widget/WidgetBundle.swift @@ -89,7 +89,6 @@ struct SmartFeedSummaryWidget: Widget { struct NetNewsWireWidgets: WidgetBundle { @WidgetBundleBuilder var body: some Widget { - SmartFeedSummaryWidget() UnreadWidget() TodayWidget() StarredWidget()