Sfoglia il codice sorgente

Shrink Upgrade to Pro top bar button

Reduce height, font size, minimum width, and corner radius so the pill
matches the rest of the toolbar scale.

Made-with: Cursor
huzaifahayat12 5 giorni fa
parent
commit
e4d84cc6b9
1 ha cambiato i file con 4 aggiunte e 4 eliminazioni
  1. 4 4
      zoom_app/ViewController.swift

+ 4 - 4
zoom_app/ViewController.swift

@@ -1080,16 +1080,16 @@ class ViewController: NSViewController {
1080
         button.focusRingType = .none
1080
         button.focusRingType = .none
1081
         button.wantsLayer = true
1081
         button.wantsLayer = true
1082
         button.layer?.backgroundColor = accentBlue.cgColor
1082
         button.layer?.backgroundColor = accentBlue.cgColor
1083
-        button.layer?.cornerRadius = 17
1084
-        let font = NSFont.systemFont(ofSize: 13, weight: .semibold)
1083
+        button.layer?.cornerRadius = 14
1084
+        let font = NSFont.systemFont(ofSize: 11, weight: .semibold)
1085
         button.attributedTitle = NSAttributedString(string: title, attributes: [
1085
         button.attributedTitle = NSAttributedString(string: title, attributes: [
1086
             .foregroundColor: NSColor.white,
1086
             .foregroundColor: NSColor.white,
1087
             .font: font
1087
             .font: font
1088
         ])
1088
         ])
1089
         button.toolTip = title
1089
         button.toolTip = title
1090
         button.translatesAutoresizingMaskIntoConstraints = false
1090
         button.translatesAutoresizingMaskIntoConstraints = false
1091
-        button.heightAnchor.constraint(equalToConstant: 34).isActive = true
1092
-        button.widthAnchor.constraint(greaterThanOrEqualToConstant: 152).isActive = true
1091
+        button.heightAnchor.constraint(equalToConstant: 28).isActive = true
1092
+        button.widthAnchor.constraint(greaterThanOrEqualToConstant: 124).isActive = true
1093
         return button
1093
         return button
1094
     }
1094
     }
1095
 
1095