makes feed icons a bit bigger

This commit is contained in:
Stuart Breckenridge 2020-11-19 16:32:44 +08:00
parent 3e69571d09
commit fa26fd565e
6 changed files with 10 additions and 9 deletions

View File

@ -4487,7 +4487,7 @@
/* Begin PBXShellScriptBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */
515D50802326D02600EE1167 /* Run Script: Verify No Build Settings */ = { 515D50802326D02600EE1167 /* Run Script: Verify No Build Settings */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 12; buildActionMask = 8;
files = ( files = (
); );
inputFileListPaths = ( inputFileListPaths = (
@ -4499,7 +4499,7 @@
); );
outputPaths = ( outputPaths = (
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 1;
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "xcrun -sdk macosx swiftc -target x86_64-macosx10.11 buildscripts/VerifyNoBuildSettings.swift -o $CONFIGURATION_TEMP_DIR/VerifyNoBS\n$CONFIGURATION_TEMP_DIR/VerifyNoBS ${PROJECT_NAME}.xcodeproj/project.pbxproj\n\n\nif [ $? -ne 0 ]\nthen\n echo \"error: Build Setting were found in the project.pbxproj file. Most likely you didn't intend to change this file and should revert it.\"\n exit 1\nfi\n"; shellScript = "xcrun -sdk macosx swiftc -target x86_64-macosx10.11 buildscripts/VerifyNoBuildSettings.swift -o $CONFIGURATION_TEMP_DIR/VerifyNoBS\n$CONFIGURATION_TEMP_DIR/VerifyNoBS ${PROJECT_NAME}.xcodeproj/project.pbxproj\n\n\nif [ $? -ne 0 ]\nthen\n echo \"error: Build Setting were found in the project.pbxproj file. Most likely you didn't intend to change this file and should revert it.\"\n exit 1\nfi\n";
}; };

View File

@ -19,16 +19,17 @@ struct ArticleItemView: View {
// Feed Icon // Feed Icon
Image(uiImage: thumbnail(article.feedIcon)) Image(uiImage: thumbnail(article.feedIcon))
.resizable() .resizable()
.frame(width: 20, height: 20, alignment: .top) .frame(width: 25, height: 25)
.cornerRadius(4) .cornerRadius(4)
// Title and Feed Name // Title and Feed Name
VStack(alignment: .leading) { VStack(alignment: .leading) {
Text(article.articleTitle ?? "Untitled") Text(article.articleTitle ?? "Untitled")
.font(.caption) .font(.footnote)
.bold() .bold()
.lineLimit(1) .lineLimit(1)
.foregroundColor(.primary) .foregroundColor(.primary)
.padding(.top, -3)
HStack { HStack {
Text(article.feedTitle) Text(article.feedTitle)
@ -43,7 +44,7 @@ struct ArticleItemView: View {
} }
} }
}) })
}) }).padding(.bottom, 4)
} }
func thumbnail(_ data: Data?) -> UIImage { func thumbnail(_ data: Data?) -> UIImage {

View File

@ -27,7 +27,7 @@ struct StarredWidgetView : View {
Spacer() Spacer()
nnwImage nnwImage
} }
VStack(alignment:.leading, spacing: 4) { VStack(alignment:.leading, spacing: 2) {
ForEach(0..<maxCount(), content: { i in ForEach(0..<maxCount(), content: { i in
ArticleItemView(article: entry.widgetData.starredArticles[i], ArticleItemView(article: entry.widgetData.starredArticles[i],
deepLink: WidgetDeepLink.starredArticle(id: entry.widgetData.starredArticles[i].id).url) deepLink: WidgetDeepLink.starredArticle(id: entry.widgetData.starredArticles[i].id).url)

View File

@ -27,7 +27,7 @@ struct TodayWidgetView : View {
Spacer() Spacer()
nnwImage nnwImage
} }
VStack(alignment:.leading, spacing: 4) { VStack(alignment:.leading, spacing: 2) {
ForEach(0..<maxCount(), content: { i in ForEach(0..<maxCount(), content: { i in
ArticleItemView(article: entry.widgetData.todayArticles[i], ArticleItemView(article: entry.widgetData.todayArticles[i],
deepLink: WidgetDeepLink.todayArticle(id: entry.widgetData.todayArticles[i].id).url) deepLink: WidgetDeepLink.todayArticle(id: entry.widgetData.todayArticles[i].id).url)

View File

@ -27,7 +27,7 @@ struct UnreadWidgetView : View {
Spacer() Spacer()
nnwImage nnwImage
} }
VStack(alignment:.leading, spacing: 4) { VStack(alignment:.leading, spacing: 2) {
ForEach(0..<maxCount(), content: { i in ForEach(0..<maxCount(), content: { i in
ArticleItemView(article: entry.widgetData.unreadArticles[i], ArticleItemView(article: entry.widgetData.unreadArticles[i],
deepLink: WidgetDeepLink.unreadArticle(id: entry.widgetData.unreadArticles[i].id).url) deepLink: WidgetDeepLink.unreadArticle(id: entry.widgetData.unreadArticles[i].id).url)

View File

@ -44,7 +44,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
coordinator.handle(userActivity) coordinator.handle(userActivity)
} }
if let _ = connectionOptions.urlContexts.first { if let _ = connectionOptions.urlContexts.first?.url {
self.scene(scene, openURLContexts: connectionOptions.urlContexts) self.scene(scene, openURLContexts: connectionOptions.urlContexts)
} }