Add shadow in the scroll

This commit is contained in:
Hariharan Mudaliar 2025-12-25 01:10:08 +05:30
commit 0eaa9bc1e0
No known key found for this signature in database
GPG key ID: 025583EB0BE5640E

View file

@ -395,6 +395,7 @@ struct NotchClipboardList: View {
.frame(maxWidth: .infinity, maxHeight: .infinity)
.padding(.vertical, 30) // Add padding so it's not touching header
} else {
ZStack {
ScrollView {
LazyVStack(spacing: 4) { // Tighter spacing
ForEach(clipboardManager.clipboardHistory) { item in
@ -425,6 +426,17 @@ struct NotchClipboardList: View {
.padding(.horizontal, 16)
.padding(.bottom, 20)
}
LinearGradient(colors: [Color.black.opacity(0.65), .clear], startPoint: .top, endPoint: .bottom)
.frame(height: 16)
.allowsHitTesting(false)
.frame(maxHeight: .infinity, alignment: .top)
LinearGradient(colors: [.clear, Color.black.opacity(0.65)], startPoint: .top, endPoint: .bottom)
.frame(height: 16)
.allowsHitTesting(false)
.frame(maxHeight: .infinity, alignment: .bottom)
}
}
}
.frame(maxHeight: .infinity)
@ -700,6 +712,7 @@ struct NoteListView: View {
}
.frame(maxWidth: .infinity, maxHeight: .infinity)
} else {
ZStack {
ScrollView {
let useGrid = sortedNotes.count > 3
let columns = useGrid ? [GridItem(.flexible(), spacing: 8), GridItem(.flexible(), spacing: 8)] : [GridItem(.flexible())]
@ -721,6 +734,17 @@ struct NoteListView: View {
.padding(.horizontal, 16)
.padding(.bottom, 20)
}
LinearGradient(colors: [Color.black.opacity(0.65), .clear], startPoint: .top, endPoint: .bottom)
.frame(height: 16)
.allowsHitTesting(false)
.frame(maxHeight: .infinity, alignment: .top)
LinearGradient(colors: [.clear, Color.black.opacity(0.65)], startPoint: .top, endPoint: .bottom)
.frame(height: 16)
.allowsHitTesting(false)
.frame(maxHeight: .infinity, alignment: .bottom)
}
}
}
.frame(maxHeight: .infinity)