Browse Source

Remove theme picker from settings and set main window height to 770.

The app keeps a fixed light appearance; default and minimum content height are now 770pt so launch and resize match the intended layout.

Co-authored-by: Cursor <cursoragent@cursor.com>
AhtashamShahzad1 2 tháng trước cách đây
mục cha
commit
8c7aafc519

+ 2 - 2
App for Indeed/AppDelegate.swift

@@ -8,8 +8,8 @@
 import Cocoa
 
 enum AppWindowConfiguration {
-    static let defaultContentSize = NSSize(width: 1120, height: 750)
-    static let minimumContentSize = NSSize(width: 1120, height: 750)
+    static let defaultContentSize = NSSize(width: 1120, height: 770)
+    static let minimumContentSize = NSSize(width: 1120, height: 770)
 
     @MainActor
     static func apply(to window: NSWindow) {

+ 2 - 2
App for Indeed/Base.lproj/Main.storyboard

@@ -686,7 +686,7 @@
                     <window key="window" title="App for Indeed" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="YES" animationBehavior="default" id="IQv-IB-iLA">
                         <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES" fullSizeContentView="YES"/>
                         <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
-                        <rect key="contentRect" x="196" y="240" width="1120" height="750"/>
+                        <rect key="contentRect" x="196" y="240" width="1120" height="770"/>
                         <rect key="screenRect" x="0.0" y="0.0" width="1680" height="1027"/>
                         <connections>
                             <outlet property="delegate" destination="B8D-0N-5wS" id="98r-iN-zZc"/>
@@ -705,7 +705,7 @@
             <objects>
                 <viewController id="XfG-lQ-9wD" customClass="ViewController" customModuleProvider="target" sceneMemberID="viewController">
                     <view key="view" id="m2S-Jp-Qdl">
-                        <rect key="frame" x="0.0" y="0.0" width="1120" height="750"/>
+                        <rect key="frame" x="0.0" y="0.0" width="1120" height="770"/>
                         <autoresizingMask key="autoresizingMask"/>
                     </view>
                 </viewController>

+ 0 - 42
App for Indeed/Views/DashboardView.swift

@@ -120,7 +120,6 @@ final class DashboardView: NSView, NSTextFieldDelegate {
     private let savedJobsDocumentView = JobListingsDocumentView()
     private let savedJobsStack = NSStackView()
     private let settingsPageContainer = NSView()
-    private let themeControl = NSSegmentedControl()
     private let cvMakerPageContainer = NSView()
     private lazy var cvMakerPageView: CVMakerPageView = {
         CVMakerPageView()
@@ -1498,7 +1497,6 @@ final class DashboardView: NSView, NSTextFieldDelegate {
 
         let settingsSection = makeSettingsSection(rows: [
             makeSettingsRow(title: "Share App", systemImage: "square.and.arrow.up", accessory: nil),
-            makeSettingsRow(title: "Theme", systemImage: "circle.lefthalf.filled", accessory: makeThemeControl()),
             makeSettingsRow(title: "More Apps", systemImage: "square.grid.2x2", accessory: nil)
         ])
 
@@ -1534,35 +1532,6 @@ final class DashboardView: NSView, NSTextFieldDelegate {
         ])
     }
 
-    private func makeThemeControl() -> NSSegmentedControl {
-        themeControl.segmentCount = 3
-        themeControl.trackingMode = .selectOne
-        themeControl.setLabel("System", forSegment: 0)
-        themeControl.setLabel("Light", forSegment: 1)
-        themeControl.setLabel("Dark", forSegment: 2)
-        themeControl.target = self
-        themeControl.action = #selector(didChangeThemeSelection(_:))
-        switch NSApp.appearance?.bestMatch(from: [.darkAqua, .aqua]) {
-        case .darkAqua:
-            themeControl.selectedSegment = 2
-        case .aqua:
-            themeControl.selectedSegment = 1
-        default:
-            themeControl.selectedSegment = 0
-        }
-        themeControl.segmentStyle = .rounded
-        themeControl.segmentDistribution = .fillEqually
-        themeControl.setWidth(68, forSegment: 0)
-        themeControl.setWidth(68, forSegment: 1)
-        themeControl.setWidth(68, forSegment: 2)
-        themeControl.controlSize = .large
-        themeControl.font = .systemFont(ofSize: 13, weight: .semibold)
-        themeControl.translatesAutoresizingMaskIntoConstraints = false
-        themeControl.widthAnchor.constraint(equalToConstant: 204).isActive = true
-        themeControl.heightAnchor.constraint(equalToConstant: 30).isActive = true
-        return themeControl
-    }
-
     private func makeSettingsSection(rows: [NSView]) -> NSView {
         let section = NSStackView()
         section.orientation = .vertical
@@ -2509,17 +2478,6 @@ final class DashboardView: NSView, NSTextFieldDelegate {
         }
     }
 
-    @objc private func didChangeThemeSelection(_ sender: NSSegmentedControl) {
-        switch sender.selectedSegment {
-        case 1:
-            NSApp.appearance = NSAppearance(named: .aqua)
-        case 2:
-            NSApp.appearance = NSAppearance(named: .darkAqua)
-        default:
-            NSApp.appearance = nil
-        }
-    }
-
     private func selectSidebarItem(at index: Int) {
         dismissIndeedJobBrowserEmbedded()
         guard index >= 0, index < currentSidebarItems.count else { return }