mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-29 08:04:32 +00:00
Fix: Added scroll shadow in presets and event scroll
This commit is contained in:
parent
34e435b400
commit
1b24e042de
2 changed files with 56 additions and 28 deletions
|
|
@ -296,6 +296,7 @@ struct EventListView: View {
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
ScrollViewReader { proxy in
|
ScrollViewReader { proxy in
|
||||||
|
ZStack {
|
||||||
List {
|
List {
|
||||||
ForEach(filteredEvents) { event in
|
ForEach(filteredEvents) { event in
|
||||||
Button(action: {
|
Button(action: {
|
||||||
|
|
@ -317,6 +318,19 @@ struct EventListView: View {
|
||||||
.scrollIndicators(.never)
|
.scrollIndicators(.never)
|
||||||
.scrollContentBackground(.hidden)
|
.scrollContentBackground(.hidden)
|
||||||
.background(Color.clear)
|
.background(Color.clear)
|
||||||
|
|
||||||
|
LinearGradient(colors: [Color.black.opacity(0.65), .clear], startPoint: .top, endPoint: .bottom)
|
||||||
|
.frame(height: 16)
|
||||||
|
.allowsHitTesting(false)
|
||||||
|
.alignmentGuide(.top) { d in d[.top] }
|
||||||
|
.frame(maxHeight: .infinity, alignment: .top)
|
||||||
|
|
||||||
|
LinearGradient(colors: [.clear, Color.black.opacity(0.65)], startPoint: .top, endPoint: .bottom)
|
||||||
|
.frame(height: 16)
|
||||||
|
.allowsHitTesting(false)
|
||||||
|
.alignmentGuide(.bottom) { d in d[.bottom] }
|
||||||
|
.frame(maxHeight: .infinity, alignment: .bottom)
|
||||||
|
}
|
||||||
.onAppear {
|
.onAppear {
|
||||||
scrollToRelevantEvent(proxy: proxy)
|
scrollToRelevantEvent(proxy: proxy)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -99,6 +99,7 @@ struct NotchTimerView: View {
|
||||||
} else {
|
} else {
|
||||||
let computedHeight = CGFloat(timerPresets.count) * 60 + 4
|
let computedHeight = CGFloat(timerPresets.count) * 60 + 4
|
||||||
let listHeight = min(max(0, maxTabContentHeight - 16), computedHeight)
|
let listHeight = min(max(0, maxTabContentHeight - 16), computedHeight)
|
||||||
|
ZStack {
|
||||||
List {
|
List {
|
||||||
ForEach(timerPresets) { preset in
|
ForEach(timerPresets) { preset in
|
||||||
TimerPresetCard(preset: preset, isActive: timerManager.activePresetId == preset.id) {
|
TimerPresetCard(preset: preset, isActive: timerManager.activePresetId == preset.id) {
|
||||||
|
|
@ -113,6 +114,19 @@ struct NotchTimerView: View {
|
||||||
.listStyle(.plain)
|
.listStyle(.plain)
|
||||||
.scrollContentBackground(.hidden)
|
.scrollContentBackground(.hidden)
|
||||||
.scrollIndicators(.never)
|
.scrollIndicators(.never)
|
||||||
|
|
||||||
|
LinearGradient(colors: [Color.black.opacity(0.65), .clear], startPoint: .top, endPoint: .bottom)
|
||||||
|
.frame(height: 16)
|
||||||
|
.allowsHitTesting(false)
|
||||||
|
.alignmentGuide(.top) { d in d[.top] }
|
||||||
|
.frame(maxHeight: .infinity, alignment: .top)
|
||||||
|
|
||||||
|
LinearGradient(colors: [.clear, Color.black.opacity(0.65)], startPoint: .top, endPoint: .bottom)
|
||||||
|
.frame(height: 16)
|
||||||
|
.allowsHitTesting(false)
|
||||||
|
.alignmentGuide(.bottom) { d in d[.bottom] }
|
||||||
|
.frame(maxHeight: .infinity, alignment: .bottom)
|
||||||
|
}
|
||||||
.frame(height: listHeight)
|
.frame(height: listHeight)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue