AppInstaller // Fine-tune the visual style.
This commit is contained in:
parent
4c97eae53e
commit
4b0ec368e7
|
@ -72,10 +72,12 @@ public struct MainView: View {
|
||||||
HStack(alignment: .top) {
|
HStack(alignment: .top) {
|
||||||
Text("i18n:installer.DISCLAIMER_TEXT")
|
Text("i18n:installer.DISCLAIMER_TEXT")
|
||||||
.font(.custom("Tahoma", size: 11))
|
.font(.custom("Tahoma", size: 11))
|
||||||
|
.opacity(0.5)
|
||||||
.frame(maxWidth: .infinity)
|
.frame(maxWidth: .infinity)
|
||||||
VStack(spacing: 4) {
|
VStack(spacing: 4) {
|
||||||
Button { installationButtonClicked() } label: {
|
Button { installationButtonClicked() } label: {
|
||||||
Text(isUpgrading ? "i18n:installer.DO_APP_UPGRADE" : "i18n:installer.ACCEPT_INSTALLATION").frame(width: 114)
|
Text(isUpgrading ? "i18n:installer.DO_APP_UPGRADE" : "i18n:installer.ACCEPT_INSTALLATION")
|
||||||
|
.bold().frame(width: 114)
|
||||||
}
|
}
|
||||||
.keyboardShortcut(.defaultAction)
|
.keyboardShortcut(.defaultAction)
|
||||||
.disabled(!isCancelButtonEnabled)
|
.disabled(!isCancelButtonEnabled)
|
||||||
|
@ -136,10 +138,13 @@ public struct MainView: View {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// OTHER
|
// OTHER
|
||||||
.padding([.horizontal, .bottom], 12)
|
.padding(12)
|
||||||
.frame(width: 533, alignment: .topLeading)
|
.frame(width: 533, alignment: .topLeading)
|
||||||
.navigationTitle(mainWindowTitle)
|
.navigationTitle(mainWindowTitle)
|
||||||
.fixedSize()
|
.fixedSize()
|
||||||
|
.foregroundStyle(Color(nsColor: NSColor.textColor))
|
||||||
|
.background(Color(nsColor: NSColor.windowBackgroundColor))
|
||||||
|
.clipShape(RoundedRectangle(cornerRadius: 16))
|
||||||
.frame(minWidth: 533, idealWidth: 533, maxWidth: 533,
|
.frame(minWidth: 533, idealWidth: 533, maxWidth: 533,
|
||||||
minHeight: 386, idealHeight: 386, maxHeight: 386,
|
minHeight: 386, idealHeight: 386, maxHeight: 386,
|
||||||
alignment: .top)
|
alignment: .top)
|
||||||
|
|
|
@ -13,12 +13,31 @@ import SwiftUI
|
||||||
struct vChewingInstallerApp: App {
|
struct vChewingInstallerApp: App {
|
||||||
var body: some Scene {
|
var body: some Scene {
|
||||||
WindowGroup {
|
WindowGroup {
|
||||||
MainView()
|
ZStack(alignment: .center) {
|
||||||
|
LinearGradient(
|
||||||
|
gradient: Gradient(
|
||||||
|
colors: [
|
||||||
|
Color(red: 0, green: 0, blue: 0xF4 / 255),
|
||||||
|
.black,
|
||||||
|
]
|
||||||
|
),
|
||||||
|
startPoint: .top, endPoint: .bottom
|
||||||
|
).overlay(alignment: .topLeading) {
|
||||||
|
Text("vChewing Input Method")
|
||||||
|
.font(.system(size: 30))
|
||||||
|
.italic().bold()
|
||||||
|
.padding()
|
||||||
|
.foregroundStyle(Color.white)
|
||||||
|
.shadow(color: .black, radius: 0, x: 5, y: 5)
|
||||||
|
}
|
||||||
|
MainView()
|
||||||
|
.shadow(color: .black, radius: 3, x: 0, y: 0)
|
||||||
|
}.frame(width: 1000, height: 630)
|
||||||
.onAppear {
|
.onAppear {
|
||||||
NSWindow.allowsAutomaticWindowTabbing = false
|
NSWindow.allowsAutomaticWindowTabbing = false
|
||||||
NSApp.windows.forEach { window in
|
NSApp.windows.forEach { window in
|
||||||
window.titlebarAppearsTransparent = true
|
window.titlebarAppearsTransparent = true
|
||||||
window.setContentSize(.init(width: 533, height: 386))
|
window.setContentSize(.init(width: 1000, height: 630))
|
||||||
window.standardWindowButton(.closeButton)?.isHidden = true
|
window.standardWindowButton(.closeButton)?.isHidden = true
|
||||||
window.standardWindowButton(.miniaturizeButton)?.isHidden = true
|
window.standardWindowButton(.miniaturizeButton)?.isHidden = true
|
||||||
window.standardWindowButton(.zoomButton)?.isHidden = true
|
window.standardWindowButton(.zoomButton)?.isHidden = true
|
||||||
|
|
Loading…
Reference in New Issue