Skip to content
This repository was archived by the owner on Sep 12, 2024. It is now read-only.

Commit 17ac322

Browse files
committed
Update AppDelegate.swift
1 parent c424612 commit 17ac322

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

Snip/AppDelegate.swift

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,25 @@ class AppDelegate: NSObject, NSApplicationDelegate {
3939
.environmentObject(Settings())
4040
.environmentObject(AppState())
4141
.edgesIgnoringSafeArea(.top)
42-
.frame(minWidth: 700, maxWidth: .infinity, minHeight: 500, maxHeight: .infinity)
42+
.frame(minWidth: 700,
43+
maxWidth: .infinity,
44+
minHeight: 500,
45+
maxHeight: .infinity)
4346

4447
window = NSWindow(
45-
contentRect: NSRect(x: 0, y: 0, width: 1000, height: 700),
46-
styleMask: [.unifiedTitleAndToolbar, .texturedBackground, .fullSizeContentView, .titled, .closable, .miniaturizable, .resizable, .texturedBackground],
47-
backing: .buffered, defer: false)
48+
contentRect: NSRect(x: 0,
49+
y: 0,
50+
width: 1000,
51+
height: 700),
52+
styleMask: [.unifiedTitleAndToolbar,
53+
.texturedBackground,
54+
.fullSizeContentView,
55+
.titled, .closable,
56+
.miniaturizable,
57+
.resizable,
58+
.texturedBackground],
59+
backing: .buffered,
60+
defer: false)
4861
window.titleVisibility = .hidden
4962
window.titlebarAppearsTransparent = true
5063
window.toolbar?.isVisible = false
@@ -61,7 +74,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
6174

6275
func applicationShouldHandleReopen(_ sender: NSApplication, hasVisibleWindows flag: Bool) -> Bool {
6376
if !flag {
64-
sender.windows.forEach { $0.makeKeyAndOrderFront(self) }
77+
sender.windows.forEach { $0.makeKeyAndOrderFront(self) }
6578
}
6679
return true
6780
}

0 commit comments

Comments
 (0)