From ec191d77aab299c39560acf262e6f524db27228c Mon Sep 17 00:00:00 2001 From: FuelBoard Contributor Date: Tue, 11 Aug 2026 22:15:11 +0100 Subject: [PATCH] Cross-fade large title with compact bar on scroll (Mail-style) --- FuelBoard/StationsView.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/FuelBoard/StationsView.swift b/FuelBoard/StationsView.swift index c6e8e60..336cef6 100644 --- a/FuelBoard/StationsView.swift +++ b/FuelBoard/StationsView.swift @@ -31,7 +31,9 @@ struct StationsView: View { List { // Large title header (icon + title). Native navigation titles // can't carry an icon, so this is a real row at the top of the - // list; it scrolls away like Mail's large title. + // list. It cross-fades with the compact bar: once the list + // scrolls, this large title fades out in place while the + // smaller icon+title bar fades in below the nav bar (Mail-style). HStack(spacing: 10) { Image(systemName: "fuelpump.fill") .font(.system(size: 34)) @@ -44,6 +46,8 @@ struct StationsView: View { .listRowSeparator(.hidden) .listRowInsets(EdgeInsets(top: 0, leading: 16, bottom: 0, trailing: 16)) .listRowBackground(Color.clear) + .opacity(isScrolled ? 0 : 1) + .animation(.easeInOut(duration: 0.2), value: isScrolled) Section { if let location {