Quellcode durchsuchen

Fix Saved Jobs header alignment with job list

Pin the title and subtitle to the leading edge by using a leading outer stack alignment, full-width constraints for the header and scroll view, and left-to-right layout on the saved jobs container.

Co-authored-by: Cursor <cursoragent@cursor.com>
AhtashamShahzad1 vor 2 Monaten
Ursprung
Commit
96a12c43c2
1 geänderte Dateien mit 6 neuen und 1 gelöschten Zeilen
  1. 6 1
      App for Indeed/Views/DashboardView.swift

+ 6 - 1
App for Indeed/Views/DashboardView.swift

@@ -774,8 +774,10 @@ final class DashboardView: NSView, NSTextFieldDelegate {
         let savedOuterStack = NSStackView(views: [savedHeaderStack, savedJobsScrollView])
         savedOuterStack.orientation = .vertical
         savedOuterStack.spacing = 16
-        savedOuterStack.alignment = .width
+        // Leading alignment plus explicit column width keeps the title and subtitle on the same edge as the cards.
+        savedOuterStack.alignment = .leading
         savedOuterStack.translatesAutoresizingMaskIntoConstraints = false
+        savedJobsPageContainer.userInterfaceLayoutDirection = .leftToRight
         savedJobsPageContainer.addSubview(savedOuterStack)
         NSLayoutConstraint.activate([
             savedOuterStack.leadingAnchor.constraint(equalTo: savedJobsPageContainer.leadingAnchor, constant: 32),
@@ -783,6 +785,9 @@ final class DashboardView: NSView, NSTextFieldDelegate {
             savedOuterStack.topAnchor.constraint(equalTo: savedJobsPageContainer.topAnchor, constant: 8),
             savedOuterStack.bottomAnchor.constraint(equalTo: savedJobsPageContainer.bottomAnchor),
 
+            savedHeaderStack.widthAnchor.constraint(equalTo: savedOuterStack.widthAnchor),
+            savedJobsScrollView.widthAnchor.constraint(equalTo: savedOuterStack.widthAnchor),
+
             savedJobsDocumentView.topAnchor.constraint(equalTo: savedJobsScrollView.contentView.topAnchor),
             savedJobsDocumentView.leadingAnchor.constraint(equalTo: savedJobsScrollView.contentView.leadingAnchor),
             savedJobsDocumentView.widthAnchor.constraint(equalTo: savedJobsScrollView.contentView.widthAnchor)