mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-08-14 20:10:02 +00:00
banner wip
This commit is contained in:
@@ -123,11 +123,16 @@ struct SupportSimpleXBanner: View {
|
||||
}
|
||||
|
||||
private func gradientBackground() -> some View {
|
||||
let gp = OnboardingCardView.gradientPoints(aspectRatio: 4.0, scale: colorScheme == .light ? 1.2 : 1.5)
|
||||
// Same endpoint COLORS as ConnectBannerCard ("New 1-time link" / "Paste link / Scan")
|
||||
// — first and last stops only. OnboardingCardView.lightStops has an intermediate blue
|
||||
// plateau (0.0–0.5) that made this wide-short banner read as almost entirely blue with
|
||||
// white only in the last ~10%. Using just the extremes gives a smooth transition
|
||||
// across the whole axis. .leading → .trailing keeps it fully horizontal.
|
||||
let stops = colorScheme == .light ? OnboardingCardView.lightStops : OnboardingCardView.darkStops
|
||||
return LinearGradient(
|
||||
stops: colorScheme == .light ? OnboardingCardView.lightStops : OnboardingCardView.darkStops,
|
||||
startPoint: gp.start,
|
||||
endPoint: gp.end
|
||||
colors: [stops.first!.color, stops.last!.color],
|
||||
startPoint: .leading,
|
||||
endPoint: .trailing
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user