Selaa lähdekoodia

Update main window chrome styling for a cleaner edge-to-edge look.

This removes the titled window bar, applies rounded window corners, and adds top content padding so the launcher layout sits comfortably below the window edge.

Made-with: Cursor
Hussain Afzal 3 kuukautta sitten
vanhempi
sitoutus
13b1900e51
2 muutettua tiedostoa jossa 11 lisäystä ja 0 poistoa
  1. 10 0
      google_apps/AppDelegate.swift
  2. 1 0
      google_apps/LauncherRootView.swift

+ 10 - 0
google_apps/AppDelegate.swift

@@ -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
     }

+ 1 - 0
google_apps/LauncherRootView.swift

@@ -165,6 +165,7 @@ struct LauncherRootView: View {
                 appsPage
             }
             .padding(.horizontal, 10)
+            .padding(.top, 14)
             .padding(.bottom, 8)
         }
         .sheet(item: $selectedApp) { app in