|
@@ -47,6 +47,7 @@ struct DashboardWidget: Widget {
|
|
|
.supportedFamilies([.systemLarge])
|
|
|
.configurationDisplayName("Dashboard")
|
|
|
.description(NSLocalizedString("_description_dashboardwidget_", comment: ""))
|
|
|
+ .contentMarginsDisabled()
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -60,6 +61,7 @@ struct FilesWidget: Widget {
|
|
|
.supportedFamilies([.systemLarge])
|
|
|
.configurationDisplayName("Files")
|
|
|
.description(NSLocalizedString("_description_fileswidget_", comment: ""))
|
|
|
+ .contentMarginsDisabled()
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -73,6 +75,7 @@ struct ToolbarWidget: Widget {
|
|
|
.supportedFamilies([.systemMedium])
|
|
|
.configurationDisplayName("Toolbar")
|
|
|
.description(NSLocalizedString("_description_toolbarwidget_", comment: ""))
|
|
|
+ .contentMarginsDisabled()
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -87,8 +90,21 @@ struct LockscreenWidget: Widget {
|
|
|
.supportedFamilies([.accessoryRectangular, .accessoryCircular])
|
|
|
.configurationDisplayName(NSLocalizedString("_title_lockscreenwidget_", comment: ""))
|
|
|
.description(NSLocalizedString("_description_lockscreenwidget_", comment: ""))
|
|
|
+ .contentMarginsDisabled()
|
|
|
} else {
|
|
|
return EmptyWidgetConfiguration()
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+extension View {
|
|
|
+ func widgetBackground(_ backgroundView: some View) -> some View {
|
|
|
+ if #available(iOSApplicationExtension 17.0, *) {
|
|
|
+ return containerBackground(for: .widget) {
|
|
|
+ backgroundView
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ return background(backgroundView)
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|