Skip to content

Commit

Permalink
Set proper border color for widgets (#2446)
Browse files Browse the repository at this point in the history
  • Loading branch information
dus7 authored Feb 7, 2024
1 parent 3d08436 commit fa70669
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Widgets/WidgetViews.swift
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ struct FavoritesWidgetView: View {
.padding(EdgeInsets(top: widgetFamily == .systemLarge ? 48 : 60, leading: 0, bottom: 0, trailing: 0))

}
.widgetContainerBackground()
.widgetContainerBackground(color: .widgetBackground)
}
}

Expand Down Expand Up @@ -240,17 +240,17 @@ struct SearchWidgetView: View {
}
}.accessibilityHidden(true)
}
.widgetContainerBackground()
.widgetContainerBackground(color: .widgetBackground)
}
}

// See https://stackoverflow.com/a/59228385/73479
extension View {

@ViewBuilder func widgetContainerBackground() -> some View {
@ViewBuilder func widgetContainerBackground(color: Color = .clear) -> some View {
if #available(iOSApplicationExtension 17.0, *) {
containerBackground(for: .widget) {
Color.clear
color
}
}
}
Expand Down

0 comments on commit fa70669

Please sign in to comment.