Переглянути джерело

Fix conflicting content top constraints on Settings layout switches.

Deactivate both header and window top constraints before activating the correct one to avoid Auto Layout warnings during appearance-driven relayout.

Co-authored-by: Cursor <cursoragent@cursor.com>
Hussain Afzal 2 тижнів тому
батько
коміт
a92705d6f1
1 змінених файлів з 6 додано та 2 видалено
  1. 6 2
      smart_printer/ViewController.swift

+ 6 - 2
smart_printer/ViewController.swift

@@ -527,8 +527,12 @@ class ViewController: NSViewController {
 
         let isSettings = destination == .settings
         headerView.isHidden = isSettings
-        contentTopBelowHeader.isActive = !isSettings
-        contentTopBelowWindow.isActive = isSettings
+        NSLayoutConstraint.deactivate([contentTopBelowHeader, contentTopBelowWindow])
+        if isSettings {
+            contentTopBelowWindow.isActive = true
+        } else {
+            contentTopBelowHeader.isActive = true
+        }
     }
 
     func presentPaywall(returnToHomeOnDismiss: Bool = true) {