Преглед на файлове

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) {