|
|
@@ -861,17 +861,21 @@ final class MyProfilePageView: NSView {
|
|
861
|
861
|
|
|
862
|
862
|
private func saveButtonHost() -> NSView {
|
|
863
|
863
|
saveButton.translatesAutoresizingMaskIntoConstraints = false
|
|
|
864
|
+ saveButton.setContentHuggingPriority(.defaultLow, for: .horizontal)
|
|
864
|
865
|
let host = NSView()
|
|
865
|
866
|
host.translatesAutoresizingMaskIntoConstraints = false
|
|
866
|
867
|
host.userInterfaceLayoutDirection = .leftToRight
|
|
867
|
868
|
ProfileLayoutEnforcement.applyForcedLTR(to: host)
|
|
868
|
869
|
host.addSubview(saveButton)
|
|
|
870
|
+ let preferredWidth = saveButton.widthAnchor.constraint(equalToConstant: 292)
|
|
|
871
|
+ preferredWidth.priority = .defaultHigh
|
|
869
|
872
|
NSLayoutConstraint.activate([
|
|
870
|
|
- saveButton.leadingAnchor.constraint(equalTo: host.leadingAnchor),
|
|
|
873
|
+ saveButton.centerXAnchor.constraint(equalTo: host.centerXAnchor),
|
|
871
|
874
|
saveButton.topAnchor.constraint(equalTo: host.topAnchor),
|
|
872
|
875
|
saveButton.bottomAnchor.constraint(equalTo: host.bottomAnchor),
|
|
873
|
|
- saveButton.heightAnchor.constraint(equalToConstant: 48),
|
|
874
|
|
- saveButton.trailingAnchor.constraint(lessThanOrEqualTo: host.trailingAnchor)
|
|
|
876
|
+ saveButton.heightAnchor.constraint(equalToConstant: 54),
|
|
|
877
|
+ preferredWidth,
|
|
|
878
|
+ saveButton.widthAnchor.constraint(lessThanOrEqualTo: host.widthAnchor)
|
|
875
|
879
|
])
|
|
876
|
880
|
return host
|
|
877
|
881
|
}
|
|
|
@@ -1320,10 +1324,10 @@ private final class ProfilePrimaryButton: NSButton {
|
|
1320
|
1324
|
private func commonInit() {
|
|
1321
|
1325
|
bezelStyle = .rounded
|
|
1322
|
1326
|
isBordered = false
|
|
1323
|
|
- font = .systemFont(ofSize: 15, weight: .semibold)
|
|
|
1327
|
+ font = .systemFont(ofSize: 16, weight: .semibold)
|
|
1324
|
1328
|
contentTintColor = .white
|
|
1325
|
1329
|
wantsLayer = true
|
|
1326
|
|
- layer?.cornerRadius = 12
|
|
|
1330
|
+ layer?.cornerRadius = 14
|
|
1327
|
1331
|
if #available(macOS 11.0, *) {
|
|
1328
|
1332
|
layer?.cornerCurve = .continuous
|
|
1329
|
1333
|
}
|