ghostty/macos/Sources/Features/About/AboutView.swift
Mitchell Hashimoto 789107ff1b macos: text in about window is selectable
Fixes #1163

I also fixed the AppIconImage from being 1024x1024 to much smaller so we
don't see as many artifacts in the downsize.
2023-12-27 07:53:28 -08:00

30 lines
939 B
Swift

import SwiftUI
struct AboutView: View {
/// Read the commit from the bundle.
var build: String? { Bundle.main.infoDictionary?["CFBundleVersion"] as? String }
var commit: String? { Bundle.main.infoDictionary?["GhosttyCommit"] as? String }
var version: String? { Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String }
var body: some View {
VStack(alignment: .center) {
Image("AppIconImage")
.resizable()
.aspectRatio(contentMode: .fit)
.frame(maxHeight: 96)
Text("Ghostty")
.font(.title3)
.textSelection(.enabled)
if let version = self.version {
Text("Version: \(version)")
.font(.body)
.textSelection(.enabled)
}
}
.frame(minWidth: 300)
.padding()
}
}