mirror of
https://github.com/leonboe1/QuickDrop.git
synced 2026-11-19 12:56:06 +00:00
Add new sidebar for help
This commit is contained in:
1 parent
4743424ac4
commit
af2dbc8c2d
24 files changed
+583
-375
No files matched your search
@@ -96,19 +96,21 @@ class AppDelegate: NSObject, NSApplicationDelegate, MainAppDelegate{
|
||||
|
||||
// Create an NSWindow to host the SwiftUI view
|
||||
welcomeWindow = NSWindow(
|
||||
contentRect: NSRect(x: 0, y: 0, width: 400, height: 300),
|
||||
contentRect: NSRect(x: 0, y: 0, width: 400, height: 280),
|
||||
styleMask: [.titled, .closable],
|
||||
backing: .buffered,
|
||||
defer: false
|
||||
)
|
||||
|
||||
welcomeWindow?.styleMask.insert(.fullSizeContentView)
|
||||
welcomeWindow?.titleVisibility = .hidden
|
||||
welcomeWindow?.titlebarAppearsTransparent = true
|
||||
|
||||
welcomeWindow?.center()
|
||||
welcomeWindow?.isReleasedWhenClosed = false
|
||||
welcomeWindow?.setFrameAutosaveName("WelcomeScreen")
|
||||
welcomeWindow?.contentView = NSHostingView(rootView: welcomeView)
|
||||
|
||||
welcomeWindow?.isOpaque = false
|
||||
welcomeWindow?.backgroundColor = .clear
|
||||
|
||||
// Ensure the window is always on top
|
||||
NSApp.activate(ignoringOtherApps: true) // Brings the whole app to the front
|
||||
welcomeWindow?.makeKeyAndOrderFront(nil)
|
||||
@@ -167,7 +169,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, MainAppDelegate{
|
||||
|
||||
// Action for "Privacy Policy" menu item
|
||||
@objc func openPrivacyPolicy() {
|
||||
if let url = URL(string: " ") {
|
||||
if let url = URL(string: "http://leonboettger.com/privacy") {
|
||||
NSWorkspace.shared.open(url)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user