소스 검색

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 3 주 전
부모
커밋
96a12c43c2
1개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  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 {
774 774
         let savedOuterStack = NSStackView(views: [savedHeaderStack, savedJobsScrollView])
775 775
         savedOuterStack.orientation = .vertical
776 776
         savedOuterStack.spacing = 16
777
-        savedOuterStack.alignment = .width
777
+        // Leading alignment plus explicit column width keeps the title and subtitle on the same edge as the cards.
778
+        savedOuterStack.alignment = .leading
778 779
         savedOuterStack.translatesAutoresizingMaskIntoConstraints = false
780
+        savedJobsPageContainer.userInterfaceLayoutDirection = .leftToRight
779 781
         savedJobsPageContainer.addSubview(savedOuterStack)
780 782
         NSLayoutConstraint.activate([
781 783
             savedOuterStack.leadingAnchor.constraint(equalTo: savedJobsPageContainer.leadingAnchor, constant: 32),
@@ -783,6 +785,9 @@ final class DashboardView: NSView, NSTextFieldDelegate {
783 785
             savedOuterStack.topAnchor.constraint(equalTo: savedJobsPageContainer.topAnchor, constant: 8),
784 786
             savedOuterStack.bottomAnchor.constraint(equalTo: savedJobsPageContainer.bottomAnchor),
785 787
 
788
+            savedHeaderStack.widthAnchor.constraint(equalTo: savedOuterStack.widthAnchor),
789
+            savedJobsScrollView.widthAnchor.constraint(equalTo: savedOuterStack.widthAnchor),
790
+
786 791
             savedJobsDocumentView.topAnchor.constraint(equalTo: savedJobsScrollView.contentView.topAnchor),
787 792
             savedJobsDocumentView.leadingAnchor.constraint(equalTo: savedJobsScrollView.contentView.leadingAnchor),
788 793
             savedJobsDocumentView.widthAnchor.constraint(equalTo: savedJobsScrollView.contentView.widthAnchor)