Преглед изворни кода

Raise home sidebar icons to start near top.

Pin the home sidebar stack to the top so navigation items no longer render too low in the left rail.

Made-with: Cursor
huzaifahayat12 пре 5 дана
родитељ
комит
9bc8370099
1 измењених фајлова са 2 додато и 3 уклоњено
  1. 2 3
      zoom_app/ViewController.swift

+ 2 - 3
zoom_app/ViewController.swift

@@ -32,7 +32,7 @@ class ViewController: NSViewController {
32 32
     private let nativeTrafficLightsTopInset: CGFloat = 20
33 33
     private let brandLeadingInset: CGFloat = 84
34 34
     private let accentBlue = NSColor(calibratedRed: 27 / 255, green: 115 / 255, blue: 232 / 255, alpha: 1)
35
-    private let accentOrange = NSColor(calibratedRed: 1.0, green: 0.60, blue: 0.20, alpha: 1)
35
+    private let accentOrange = NSColor(calibratedRed: 254 / 255, green: 117 / 255, blue: 46 / 255, alpha: 1)
36 36
     private let primaryText = NSColor(calibratedWhite: 0.98, alpha: 1)
37 37
     private let secondaryText = NSColor(calibratedWhite: 0.78, alpha: 1)
38 38
     private let mutedText = NSColor(calibratedWhite: 0.66, alpha: 1)
@@ -1206,8 +1206,7 @@ class ViewController: NSViewController {
1206 1206
         ])
1207 1207
         if style == .home {
1208 1208
             NSLayoutConstraint.activate([
1209
-                stack.topAnchor.constraint(greaterThanOrEqualTo: sidebar.topAnchor, constant: 18),
1210
-                stack.centerYAnchor.constraint(equalTo: sidebar.centerYAnchor, constant: 30)
1209
+                stack.topAnchor.constraint(equalTo: sidebar.topAnchor, constant: 10)
1211 1210
             ])
1212 1211
             stack.bottomAnchor.constraint(lessThanOrEqualTo: sidebar.bottomAnchor, constant: -18).isActive = true
1213 1212
         } else {