|
|
@@ -23,14 +23,16 @@ class ViewController: NSViewController {
|
|
23
|
23
|
private let appShellBackground = NSColor(calibratedRed: 10 / 255, green: 11 / 255, blue: 12 / 255, alpha: 1)
|
|
24
|
24
|
private let contentShellBackground = NSColor(calibratedRed: 10 / 255, green: 11 / 255, blue: 12 / 255, alpha: 1)
|
|
25
|
25
|
private let topStripBackground = NSColor(calibratedRed: 22 / 255, green: 23 / 255, blue: 26 / 255, alpha: 1)
|
|
|
26
|
+ private let chromeUnifiedBackground = NSColor(calibratedRed: 22 / 255, green: 23 / 255, blue: 26 / 255, alpha: 1)
|
|
26
|
27
|
private let searchPillBackground = NSColor.white.withAlphaComponent(0.06)
|
|
27
|
28
|
private let meetingCardBackground = NSColor(calibratedRed: 30 / 255, green: 34 / 255, blue: 42 / 255, alpha: 1)
|
|
28
|
29
|
private let titleBarControlBackground = NSColor.white.withAlphaComponent(0.04)
|
|
29
|
30
|
private let titleBarLightControlBackground = NSColor.white.withAlphaComponent(0.02)
|
|
30
|
31
|
private let appShellCornerRadius: CGFloat = 20
|
|
31
|
32
|
private let homeChromeHeaderHeight: CGFloat = 56
|
|
32
|
|
- private let nativeTrafficLightsLeading: CGFloat = 18
|
|
|
33
|
+ private let nativeTrafficLightsLeading: CGFloat = 14
|
|
33
|
34
|
private let nativeTrafficLightsTopInset: CGFloat = 20
|
|
|
35
|
+ private let brandLeadingInset: CGFloat = 84
|
|
34
|
36
|
private let accentBlue = NSColor(calibratedRed: 27 / 255, green: 115 / 255, blue: 232 / 255, alpha: 1)
|
|
35
|
37
|
private let accentOrange = NSColor(calibratedRed: 1.0, green: 0.60, blue: 0.20, alpha: 1)
|
|
36
|
38
|
private let primaryText = NSColor(calibratedWhite: 0.98, alpha: 1)
|
|
|
@@ -74,6 +76,7 @@ class ViewController: NSViewController {
|
|
74
|
76
|
super.viewDidAppear()
|
|
75
|
77
|
if let window = view.window {
|
|
76
|
78
|
window.setContentSize(NSSize(width: 1020, height: 690))
|
|
|
79
|
+ window.backgroundColor = chromeUnifiedBackground
|
|
77
|
80
|
// Use full-size content view so custom top chrome sits in the titlebar region.
|
|
78
|
81
|
window.titleVisibility = .hidden
|
|
79
|
82
|
window.titlebarAppearsTransparent = true
|
|
|
@@ -665,13 +668,13 @@ class ViewController: NSViewController {
|
|
665
|
668
|
shell.layer?.borderColor = NSColor.white.withAlphaComponent(0.06).cgColor
|
|
666
|
669
|
let chromeColumn = NSView()
|
|
667
|
670
|
chromeColumn.wantsLayer = true
|
|
668
|
|
- chromeColumn.layer?.backgroundColor = NSColor.white.withAlphaComponent(0.03).cgColor
|
|
|
671
|
+ chromeColumn.layer?.backgroundColor = chromeUnifiedBackground.cgColor
|
|
669
|
672
|
let chromeDivider = NSView()
|
|
670
|
673
|
chromeDivider.wantsLayer = true
|
|
671
|
674
|
chromeDivider.layer?.backgroundColor = NSColor.black.withAlphaComponent(0.32).cgColor
|
|
672
|
675
|
let chromeHeader = NSView()
|
|
673
|
676
|
chromeHeader.wantsLayer = true
|
|
674
|
|
- chromeHeader.layer?.backgroundColor = NSColor.clear.cgColor
|
|
|
677
|
+ chromeHeader.layer?.backgroundColor = chromeUnifiedBackground.cgColor
|
|
675
|
678
|
let sidebar = makeSidebar(items: ["Home", "Meetings", "Chat", "Scheduler", "Hub", "More"], selected: "Home", style: .home)
|
|
676
|
679
|
let content = NSView()
|
|
677
|
680
|
content.wantsLayer = true
|
|
|
@@ -698,7 +701,7 @@ class ViewController: NSViewController {
|
|
698
|
701
|
chromeColumn.leadingAnchor.constraint(equalTo: shell.leadingAnchor),
|
|
699
|
702
|
chromeColumn.topAnchor.constraint(equalTo: shell.topAnchor),
|
|
700
|
703
|
chromeColumn.bottomAnchor.constraint(equalTo: shell.bottomAnchor),
|
|
701
|
|
- chromeColumn.widthAnchor.constraint(equalToConstant: 128),
|
|
|
704
|
+ chromeColumn.widthAnchor.constraint(equalToConstant: 82),
|
|
702
|
705
|
chromeDivider.topAnchor.constraint(equalTo: chromeColumn.topAnchor),
|
|
703
|
706
|
chromeDivider.bottomAnchor.constraint(equalTo: chromeColumn.bottomAnchor),
|
|
704
|
707
|
chromeDivider.trailingAnchor.constraint(equalTo: chromeColumn.trailingAnchor),
|
|
|
@@ -723,12 +726,13 @@ class ViewController: NSViewController {
|
|
723
|
726
|
brandStack.alignment = .leading
|
|
724
|
727
|
let brandTop = makeLabel("zoom", size: 14, color: primaryText, weight: .semibold, centered: false)
|
|
725
|
728
|
let brandBottom = makeLabel("Workplace", size: 27, color: primaryText, weight: .bold, centered: false)
|
|
726
|
|
- brandBottom.font = .systemFont(ofSize: 14, weight: .bold)
|
|
|
729
|
+ brandTop.font = .systemFont(ofSize: 12, weight: .semibold)
|
|
|
730
|
+ brandBottom.font = .systemFont(ofSize: 12, weight: .bold)
|
|
727
|
731
|
[brandTop, brandBottom].forEach { brandStack.addArrangedSubview($0) }
|
|
728
|
732
|
|
|
729
|
733
|
let topBar = NSView()
|
|
730
|
734
|
topBar.wantsLayer = true
|
|
731
|
|
- topBar.layer?.backgroundColor = NSColor.white.withAlphaComponent(0.03).cgColor
|
|
|
735
|
+ topBar.layer?.backgroundColor = chromeUnifiedBackground.cgColor
|
|
732
|
736
|
|
|
733
|
737
|
let topBarDivider = NSView()
|
|
734
|
738
|
topBarDivider.wantsLayer = true
|
|
|
@@ -826,7 +830,7 @@ class ViewController: NSViewController {
|
|
826
|
830
|
$0.translatesAutoresizingMaskIntoConstraints = false
|
|
827
|
831
|
}
|
|
828
|
832
|
[brandStack].forEach {
|
|
829
|
|
- chromeHeader.addSubview($0)
|
|
|
833
|
+ shell.addSubview($0)
|
|
830
|
834
|
}
|
|
831
|
835
|
[leftTopBarCluster, rightTopBarCluster, searchPill, search].forEach {
|
|
832
|
836
|
$0.translatesAutoresizingMaskIntoConstraints = false
|
|
|
@@ -844,7 +848,8 @@ class ViewController: NSViewController {
|
|
844
|
848
|
meetingsDocument.addSubview(meetingsStack)
|
|
845
|
849
|
|
|
846
|
850
|
NSLayoutConstraint.activate([
|
|
847
|
|
- brandStack.leadingAnchor.constraint(equalTo: chromeHeader.leadingAnchor, constant: 84),
|
|
|
851
|
+ brandStack.leadingAnchor.constraint(equalTo: shell.leadingAnchor, constant: brandLeadingInset),
|
|
|
852
|
+ brandStack.trailingAnchor.constraint(lessThanOrEqualTo: leftTopBarCluster.leadingAnchor, constant: -12),
|
|
848
|
853
|
brandStack.centerYAnchor.constraint(equalTo: chromeHeader.centerYAnchor, constant: -1),
|
|
849
|
854
|
|
|
850
|
855
|
topBar.topAnchor.constraint(equalTo: content.topAnchor),
|
|
|
@@ -861,7 +866,8 @@ class ViewController: NSViewController {
|
|
861
|
866
|
contentColumn.leadingAnchor.constraint(equalTo: content.leadingAnchor, constant: 8),
|
|
862
|
867
|
contentColumn.trailingAnchor.constraint(equalTo: content.trailingAnchor, constant: -8),
|
|
863
|
868
|
|
|
864
|
|
- leftTopBarCluster.leadingAnchor.constraint(equalTo: topBar.leadingAnchor, constant: 40),
|
|
|
869
|
+ leftTopBarCluster.leadingAnchor.constraint(greaterThanOrEqualTo: topBar.leadingAnchor, constant: 40),
|
|
|
870
|
+ leftTopBarCluster.leadingAnchor.constraint(greaterThanOrEqualTo: brandStack.trailingAnchor, constant: 16),
|
|
865
|
871
|
leftTopBarCluster.centerYAnchor.constraint(equalTo: topBar.centerYAnchor),
|
|
866
|
872
|
rightTopBarCluster.trailingAnchor.constraint(equalTo: topBar.trailingAnchor, constant: -12),
|
|
867
|
873
|
rightTopBarCluster.centerYAnchor.constraint(equalTo: topBar.centerYAnchor),
|