From 1421c34aeb2aca94f1a6e3f0ebdb7047f18b00ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20D=E2=80=99Aquino?= Date: Tue, 30 Jan 2024 07:42:11 +0000 Subject: [PATCH] purple: fix dark mode issues MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some views appeared broken when iOS was in dark mode, with a white background. This commit fixes that and makes sure the background is always dark. Signed-off-by: Daniel D’Aquino Reviewed-by: William Casarin Signed-off-by: William Casarin --- damus/Views/Purple/DamusPurpleTranslationSetupView.swift | 3 +-- damus/Views/Purple/DamusPurpleVerifyNpubView.swift | 1 + damus/Views/Purple/DamusPurpleWelcomeView.swift | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/damus/Views/Purple/DamusPurpleTranslationSetupView.swift b/damus/Views/Purple/DamusPurpleTranslationSetupView.swift index 671882cb..0db5fbf4 100644 --- a/damus/Views/Purple/DamusPurpleTranslationSetupView.swift +++ b/damus/Views/Purple/DamusPurpleTranslationSetupView.swift @@ -151,11 +151,10 @@ struct DamusPurpleTranslationSetupView: View { } .background(content: { ZStack { - Rectangle() - .background(.black) Image("purple-blue-gradient-1") .offset(CGSize(width: 300.0, height: -0.0)) .opacity(start ? 1.0 : 0.2) + .background(.black) Image("stars-bg") .resizable(resizingMode: .stretch) .frame(width: 500, height: 500) diff --git a/damus/Views/Purple/DamusPurpleVerifyNpubView.swift b/damus/Views/Purple/DamusPurpleVerifyNpubView.swift index 99361bac..d0e142a9 100644 --- a/damus/Views/Purple/DamusPurpleVerifyNpubView.swift +++ b/damus/Views/Purple/DamusPurpleVerifyNpubView.swift @@ -15,6 +15,7 @@ struct DamusPurpleVerifyNpubView: View { var body: some View { ZStack { Rectangle() + .foregroundStyle(Color.black) .background(Color.black) VStack { diff --git a/damus/Views/Purple/DamusPurpleWelcomeView.swift b/damus/Views/Purple/DamusPurpleWelcomeView.swift index 4b297d0a..f35cf8eb 100644 --- a/damus/Views/Purple/DamusPurpleWelcomeView.swift +++ b/damus/Views/Purple/DamusPurpleWelcomeView.swift @@ -96,11 +96,10 @@ struct DamusPurpleWelcomeView: View { } .background(content: { ZStack { - Rectangle() - .background(.black) Image("purple-blue-gradient-1") .offset(CGSize(width: 300.0, height: -0.0)) .opacity(start ? 1.0 : 0.2) + .background(.black) Image("stars-bg") .resizable(resizingMode: .stretch) .frame(width: 500, height: 500)