|
@@ -861,17 +861,21 @@ final class MyProfilePageView: NSView {
|
|
|
|
|
|
|
|
private func saveButtonHost() -> NSView {
|
|
private func saveButtonHost() -> NSView {
|
|
|
saveButton.translatesAutoresizingMaskIntoConstraints = false
|
|
saveButton.translatesAutoresizingMaskIntoConstraints = false
|
|
|
|
|
+ saveButton.setContentHuggingPriority(.defaultLow, for: .horizontal)
|
|
|
let host = NSView()
|
|
let host = NSView()
|
|
|
host.translatesAutoresizingMaskIntoConstraints = false
|
|
host.translatesAutoresizingMaskIntoConstraints = false
|
|
|
host.userInterfaceLayoutDirection = .leftToRight
|
|
host.userInterfaceLayoutDirection = .leftToRight
|
|
|
ProfileLayoutEnforcement.applyForcedLTR(to: host)
|
|
ProfileLayoutEnforcement.applyForcedLTR(to: host)
|
|
|
host.addSubview(saveButton)
|
|
host.addSubview(saveButton)
|
|
|
|
|
+ let preferredWidth = saveButton.widthAnchor.constraint(equalToConstant: 292)
|
|
|
|
|
+ preferredWidth.priority = .defaultHigh
|
|
|
NSLayoutConstraint.activate([
|
|
NSLayoutConstraint.activate([
|
|
|
- saveButton.leadingAnchor.constraint(equalTo: host.leadingAnchor),
|
|
|
|
|
|
|
+ saveButton.centerXAnchor.constraint(equalTo: host.centerXAnchor),
|
|
|
saveButton.topAnchor.constraint(equalTo: host.topAnchor),
|
|
saveButton.topAnchor.constraint(equalTo: host.topAnchor),
|
|
|
saveButton.bottomAnchor.constraint(equalTo: host.bottomAnchor),
|
|
saveButton.bottomAnchor.constraint(equalTo: host.bottomAnchor),
|
|
|
- saveButton.heightAnchor.constraint(equalToConstant: 48),
|
|
|
|
|
- saveButton.trailingAnchor.constraint(lessThanOrEqualTo: host.trailingAnchor)
|
|
|
|
|
|
|
+ saveButton.heightAnchor.constraint(equalToConstant: 54),
|
|
|
|
|
+ preferredWidth,
|
|
|
|
|
+ saveButton.widthAnchor.constraint(lessThanOrEqualTo: host.widthAnchor)
|
|
|
])
|
|
])
|
|
|
return host
|
|
return host
|
|
|
}
|
|
}
|
|
@@ -1320,10 +1324,10 @@ private final class ProfilePrimaryButton: NSButton {
|
|
|
private func commonInit() {
|
|
private func commonInit() {
|
|
|
bezelStyle = .rounded
|
|
bezelStyle = .rounded
|
|
|
isBordered = false
|
|
isBordered = false
|
|
|
- font = .systemFont(ofSize: 15, weight: .semibold)
|
|
|
|
|
|
|
+ font = .systemFont(ofSize: 16, weight: .semibold)
|
|
|
contentTintColor = .white
|
|
contentTintColor = .white
|
|
|
wantsLayer = true
|
|
wantsLayer = true
|
|
|
- layer?.cornerRadius = 12
|
|
|
|
|
|
|
+ layer?.cornerRadius = 14
|
|
|
if #available(macOS 11.0, *) {
|
|
if #available(macOS 11.0, *) {
|
|
|
layer?.cornerCurve = .continuous
|
|
layer?.cornerCurve = .continuous
|
|
|
}
|
|
}
|