|
|
@@ -104,8 +104,10 @@ class AppDelegate: NSObject, NSApplicationDelegate {
|
|
|
private func configureMainWindowIfNeeded() {
|
|
|
guard let window = NSApp.windows.first else { return }
|
|
|
window.title = "My Apps"
|
|
|
+ window.styleMask.remove(.titled)
|
|
|
window.isOpaque = false
|
|
|
window.backgroundColor = .clear
|
|
|
+ applyRoundedCorners(to: window)
|
|
|
window.titlebarAppearsTransparent = true
|
|
|
window.titleVisibility = .hidden
|
|
|
window.styleMask.insert(.fullSizeContentView)
|
|
|
@@ -125,6 +127,14 @@ class AppDelegate: NSObject, NSApplicationDelegate {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ private func applyRoundedCorners(to window: NSWindow) {
|
|
|
+ let cornerRadius: CGFloat = 16
|
|
|
+ window.hasShadow = true
|
|
|
+ window.contentView?.wantsLayer = true
|
|
|
+ window.contentView?.layer?.cornerRadius = cornerRadius
|
|
|
+ window.contentView?.layer?.masksToBounds = true
|
|
|
+ }
|
|
|
+
|
|
|
func applicationWillTerminate(_ aNotification: Notification) {
|
|
|
// Insert code here to tear down your application
|
|
|
}
|