mirror of
https://github.com/passepartoutvpn/passepartout-apple.git
synced 2025-01-18 06:29:05 +00:00
Transparent logo in version screen (#963)
Looks better on macOS and allows gradient on tvOS.
This commit is contained in:
parent
e761979134
commit
63496725c8
@ -69,7 +69,6 @@ struct AboutContentView<LinkContent, AboutDestination, LogDestination>: View whe
|
||||
}
|
||||
}
|
||||
}
|
||||
.background(navigationRoute == .version ? theme.primaryColor : nil)
|
||||
.onLoad {
|
||||
navigationRoute = .version
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ struct ProfileView: View, Routable, TunnelInstallationProviding {
|
||||
}
|
||||
}
|
||||
.ignoresSafeArea(edges: .horizontal)
|
||||
.background(theme.primaryColor)
|
||||
.background(theme.primaryGradient)
|
||||
.themeAnimation(on: showsSidePanel, category: .profiles)
|
||||
.defaultFocus($focusedField, .switchProfile)
|
||||
.onChange(of: tunnel.status, onTunnelStatus)
|
||||
|
@ -63,7 +63,7 @@ struct SettingsView: View {
|
||||
DetailView(detail: detail)
|
||||
.frame(maxWidth: .infinity)
|
||||
}
|
||||
.background(theme.primaryColor)
|
||||
.background(theme.primaryGradient)
|
||||
.onChange(of: focus) {
|
||||
guard focus != nil else {
|
||||
return
|
||||
|
@ -34,11 +34,11 @@ extension Theme {
|
||||
secondaryWeight = .light
|
||||
}
|
||||
|
||||
// public var primaryGradient: AnyGradient {
|
||||
// primaryColor
|
||||
// .opacity(0.6)
|
||||
// .gradient
|
||||
// }
|
||||
public var primaryGradient: AnyGradient {
|
||||
primaryColor
|
||||
.opacity(0.6)
|
||||
.gradient
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Shortcuts
|
||||
|
@ -40,6 +40,26 @@ public struct VersionView<Icon>: View where Icon: View {
|
||||
|
||||
public var body: some View {
|
||||
ScrollView {
|
||||
contentView
|
||||
}
|
||||
#if os(iOS)
|
||||
.background(theme.primaryColor)
|
||||
.foregroundStyle(.white)
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
extension VersionView where Icon == LogoImage {
|
||||
public init() {
|
||||
icon = {
|
||||
LogoImage()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private extension VersionView {
|
||||
var contentView: some View {
|
||||
Group {
|
||||
icon()
|
||||
.padding(.top)
|
||||
Spacer()
|
||||
@ -54,16 +74,6 @@ public struct VersionView<Icon>: View where Icon: View {
|
||||
.padding()
|
||||
}
|
||||
}
|
||||
.background(theme.primaryColor)
|
||||
.foregroundStyle(.white)
|
||||
}
|
||||
}
|
||||
|
||||
extension VersionView where Icon == LogoImage {
|
||||
public init() {
|
||||
icon = {
|
||||
LogoImage()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 4.7 KiB |
Binary file not shown.
Before Width: | Height: | Size: 9.3 KiB After Width: | Height: | Size: 7.7 KiB |
Loading…
Reference in New Issue
Block a user