mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Use containerBackground API.
This commit is contained in:
@@ -13,17 +13,19 @@ import SwiftUI
|
||||
|
||||
struct UnreadWidget: Widget {
|
||||
let kind: String = "com.ranchero.NetNewsWire.UnreadWidget"
|
||||
|
||||
|
||||
var body: some WidgetConfiguration {
|
||||
|
||||
|
||||
return StaticConfiguration(kind: kind, provider: Provider(), content: { entry in
|
||||
UnreadWidgetView(entry: entry)
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
.containerBackground(for: .widget) {
|
||||
Color.clear
|
||||
}
|
||||
})
|
||||
.configurationDisplayName(L10n.unreadWidgetTitle)
|
||||
.description(L10n.unreadWidgetDescription)
|
||||
.supportedFamilies([.systemMedium, .systemLarge])
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,11 +37,13 @@ struct TodayWidget: Widget {
|
||||
return StaticConfiguration(kind: kind, provider: Provider(), content: { entry in
|
||||
TodayWidgetView(entry: entry)
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
.containerBackground(for: .widget) {
|
||||
Color.clear
|
||||
}
|
||||
})
|
||||
.configurationDisplayName(L10n.todayWidgetTitle)
|
||||
.description(L10n.todayWidgetDescription)
|
||||
.supportedFamilies([.systemMedium, .systemLarge])
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,11 +55,13 @@ struct StarredWidget: Widget {
|
||||
return StaticConfiguration(kind: kind, provider: Provider(), content: { entry in
|
||||
StarredWidgetView(entry: entry)
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
.containerBackground(for: .widget) {
|
||||
Color.clear
|
||||
}
|
||||
})
|
||||
.configurationDisplayName(L10n.starredWidgetTitle)
|
||||
.description(L10n.starredWidgetDescription)
|
||||
.supportedFamilies([.systemMedium, .systemLarge])
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,13 +73,13 @@ struct SmartFeedSummaryWidget: Widget {
|
||||
return StaticConfiguration(kind: kind, provider: Provider(), content: { entry in
|
||||
SmartFeedSummaryWidgetView(entry: entry)
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
.background(Color("AccentColor"))
|
||||
|
||||
.containerBackground(for: .widget) {
|
||||
Color.clear
|
||||
}
|
||||
})
|
||||
.configurationDisplayName(L10n.smartFeedSummaryWidgetTitle)
|
||||
.description(L10n.smartFeedSummaryWidgetDescription)
|
||||
.supportedFamilies([.systemSmall])
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user