damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

commit ec50c750625d24a58e12ce2b4cc689f8b5ccf605
parent 0293b61d7a4fda02a1db5dd739e4f121a5ce3042
Author: William Casarin <jb55@jb55.com>
Date:   Sun, 14 May 2023 20:47:53 -0700

ui: expose raw LinearGradient in DamusGradient

This will be used in background-fill applications

Diffstat:
Mdamus/Components/Gradients/DamusGradient.swift | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/damus/Components/Gradients/DamusGradient.swift b/damus/Components/Gradients/DamusGradient.swift @@ -14,9 +14,13 @@ fileprivate let damus_grad = [damus_grad_c1, damus_grad_c2, damus_grad_c3] struct DamusGradient: View { var body: some View { - LinearGradient(colors: damus_grad, startPoint: .bottomLeading, endPoint: .topTrailing) + DamusGradient.gradient .edgesIgnoringSafeArea([.top,.bottom]) } + + static var gradient: LinearGradient { + LinearGradient(colors: damus_grad, startPoint: .bottomLeading, endPoint: .topTrailing) + } } struct DamusGradient_Previews: PreviewProvider {