#40: Update SplashScreen to match Element iOS.

This commit is contained in:
Doug
2022-06-22 09:52:55 +01:00
committed by GitHub
parent 7dcd494de8
commit 9f2ed68e37
6 changed files with 155 additions and 104 deletions
@@ -18,9 +18,15 @@ import SwiftUI
/// Standard constants used across the app's UI.
struct UIConstants {
static let maxContentWidth: CGFloat = 600
static let maxContentHeight: CGFloat = 750
/// The padding used between the top of the main content and the navigation bar.
static let topPaddingToNavigationBar: CGFloat = 16
/// The padding used between the footer and the bottom of the view.
static let actionButtonBottomPadding: CGFloat = 24
/// The height to use for top/bottom spacers to pad the views to fit the `maxContentHeight`.
static func spacerHeight(in geometry: GeometryProxy) -> CGFloat {
max(0, (geometry.size.height - maxContentHeight) / 2)
}
}