mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
layout fixes
• Ensure counts do not wrap • Reduces number of articles on large widget due to increased spacing. • Consistent vertical spacing between articles and dividers
This commit is contained in:
@@ -25,7 +25,7 @@ struct StarredWidgetView : View {
|
||||
VStack(alignment: .leading) {
|
||||
starredImage
|
||||
Spacer()
|
||||
Text(L10n.localizedCount(entry.widgetData.currentStarredCount)).bold().font(Font.system(.footnote, design: .rounded))
|
||||
Text(L10n.localizedCount(entry.widgetData.currentStarredCount)).bold().font(Font.system(.footnote, design: .rounded)).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)
|
||||
@@ -37,7 +37,8 @@ struct StarredWidgetView : View {
|
||||
Divider()
|
||||
ArticleItemView(article: entry.widgetData.starredArticles[i],
|
||||
deepLink: WidgetDeepLink.starredArticle(id: entry.widgetData.starredArticles[i].id).url)
|
||||
.padding(.vertical, 6)
|
||||
.padding(.top, 8)
|
||||
.padding(.bottom, 4)
|
||||
} else {
|
||||
ArticleItemView(article: entry.widgetData.starredArticles[i],
|
||||
deepLink: WidgetDeepLink.starredArticle(id: entry.widgetData.starredArticles[i].id).url)
|
||||
@@ -70,7 +71,7 @@ struct StarredWidgetView : View {
|
||||
|
||||
func maxCount() -> Int {
|
||||
if family == .systemLarge {
|
||||
return entry.widgetData.currentStarredCount > 8 ? 8 : entry.widgetData.currentStarredCount
|
||||
return entry.widgetData.currentStarredCount > 7 ? 7 : entry.widgetData.currentStarredCount
|
||||
}
|
||||
return entry.widgetData.currentStarredCount > 3 ? 3 : entry.widgetData.currentStarredCount
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ struct TodayWidgetView : View {
|
||||
VStack(alignment: .leading) {
|
||||
todayImage
|
||||
Spacer()
|
||||
Text(L10n.localizedCount(entry.widgetData.currentTodayCount)).bold().font(Font.system(.footnote, design: .rounded))
|
||||
Text(L10n.localizedCount(entry.widgetData.currentTodayCount)).bold().font(Font.system(.footnote, design: .rounded)).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)
|
||||
@@ -37,7 +37,8 @@ struct TodayWidgetView : View {
|
||||
Divider()
|
||||
ArticleItemView(article: entry.widgetData.todayArticles[i],
|
||||
deepLink: WidgetDeepLink.todayArticle(id: entry.widgetData.todayArticles[i].id).url)
|
||||
.padding(.vertical, 6)
|
||||
.padding(.top, 8)
|
||||
.padding(.bottom, 4)
|
||||
} else {
|
||||
ArticleItemView(article: entry.widgetData.unreadArticles[i],
|
||||
deepLink: WidgetDeepLink.todayArticle(id: entry.widgetData.todayArticles[i].id).url)
|
||||
@@ -69,7 +70,7 @@ struct TodayWidgetView : View {
|
||||
|
||||
func maxCount() -> Int {
|
||||
if family == .systemLarge {
|
||||
return entry.widgetData.todayArticles.count > 8 ? 8 : entry.widgetData.todayArticles.count
|
||||
return entry.widgetData.todayArticles.count > 7 ? 7 : entry.widgetData.todayArticles.count
|
||||
}
|
||||
return entry.widgetData.todayArticles.count > 3 ? 3 : entry.widgetData.todayArticles.count
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ struct UnreadWidgetView : View {
|
||||
VStack(alignment: .leading) {
|
||||
unreadImage
|
||||
Spacer()
|
||||
Text(L10n.localizedCount(entry.widgetData.currentUnreadCount)).bold().font(Font.system(.footnote, design: .rounded))
|
||||
Text(L10n.localizedCount(entry.widgetData.currentUnreadCount)).bold().font(Font.system(.footnote, design: .rounded)).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)
|
||||
@@ -37,7 +37,8 @@ struct UnreadWidgetView : View {
|
||||
Divider()
|
||||
ArticleItemView(article: entry.widgetData.unreadArticles[i],
|
||||
deepLink: WidgetDeepLink.unreadArticle(id: entry.widgetData.unreadArticles[i].id).url)
|
||||
.padding(.vertical, 6)
|
||||
.padding(.top, 8)
|
||||
.padding(.bottom, 4)
|
||||
} else {
|
||||
ArticleItemView(article: entry.widgetData.unreadArticles[i],
|
||||
deepLink: WidgetDeepLink.unreadArticle(id: entry.widgetData.unreadArticles[i].id).url)
|
||||
@@ -69,7 +70,7 @@ struct UnreadWidgetView : View {
|
||||
|
||||
func maxCount() -> Int {
|
||||
if family == .systemLarge {
|
||||
return entry.widgetData.unreadArticles.count > 8 ? 8 : entry.widgetData.unreadArticles.count
|
||||
return entry.widgetData.unreadArticles.count > 7 ? 7 : entry.widgetData.unreadArticles.count
|
||||
}
|
||||
return entry.widgetData.unreadArticles.count > 3 ? 3 : entry.widgetData.unreadArticles.count
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user