Merge pull request #26 from hkgood/cursor/fix-home-stats-background-6baf
fix: HomeStatsCard background ShapeStyle compile error
This commit is contained in:
@@ -57,18 +57,7 @@ struct HomeStatsCard: View {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.background(cardBackground, in: RoundedRectangle(cornerRadius: Radius.xl, style: .continuous))
|
.background {
|
||||||
.overlay(
|
|
||||||
RoundedRectangle(cornerRadius: Radius.xl, style: .continuous)
|
|
||||||
.stroke(palette.divider, lineWidth: 0.5)
|
|
||||||
)
|
|
||||||
.onAppear(perform: refreshDictionaryCount)
|
|
||||||
.onReceive(NotificationCenter.default.publisher(for: UIApplication.didBecomeActiveNotification)) { _ in
|
|
||||||
refreshDictionaryCount()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private var cardBackground: some View {
|
|
||||||
ZStack(alignment: .top) {
|
ZStack(alignment: .top) {
|
||||||
palette.surface
|
palette.surface
|
||||||
LinearGradient(
|
LinearGradient(
|
||||||
@@ -82,6 +71,16 @@ struct HomeStatsCard: View {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.clipShape(RoundedRectangle(cornerRadius: Radius.xl, style: .continuous))
|
||||||
|
.overlay(
|
||||||
|
RoundedRectangle(cornerRadius: Radius.xl, style: .continuous)
|
||||||
|
.stroke(palette.divider, lineWidth: 0.5)
|
||||||
|
)
|
||||||
|
.onAppear(perform: refreshDictionaryCount)
|
||||||
|
.onReceive(NotificationCenter.default.publisher(for: UIApplication.didBecomeActiveNotification)) { _ in
|
||||||
|
refreshDictionaryCount()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private func statCell(systemImage: String, value: String, label: LocalizedStringKey) -> some View {
|
private func statCell(systemImage: String, value: String, label: LocalizedStringKey) -> some View {
|
||||||
VStack(alignment: .leading, spacing: Spacing.xs) {
|
VStack(alignment: .leading, spacing: Spacing.xs) {
|
||||||
|
|||||||
Reference in New Issue
Block a user