|
|
@@ -883,6 +883,11 @@ final class MyProfilePageView: NSView {
|
|
|
|
|
|
// MARK: - Work experience & education rows
|
|
|
|
|
|
+private enum ProfileEntryCardLayout {
|
|
|
+ /// Horizontal inset of fields inside each work/education entry card (matches main profile form).
|
|
|
+ static let horizontalInset: CGFloat = 28
|
|
|
+}
|
|
|
+
|
|
|
private final class WorkExperienceEntryView: NSView {
|
|
|
var onDelete: (() -> Void)?
|
|
|
|
|
|
@@ -981,17 +986,17 @@ private final class WorkExperienceEntryView: NSView {
|
|
|
inner.spacing = 16
|
|
|
inner.alignment = .leading
|
|
|
inner.translatesAutoresizingMaskIntoConstraints = false
|
|
|
- inner.edgeInsets = NSEdgeInsets(top: 16, left: 18, bottom: 16, right: 18)
|
|
|
+ inner.edgeInsets = NSEdgeInsets()
|
|
|
inner.userInterfaceLayoutDirection = .leftToRight
|
|
|
ProfileLayoutEnforcement.applyForcedLTR(to: inner)
|
|
|
inner.pinAllArrangedSubviewWidthsEqualToStackWidth()
|
|
|
|
|
|
addSubview(inner)
|
|
|
NSLayoutConstraint.activate([
|
|
|
- inner.leftAnchor.constraint(equalTo: leftAnchor),
|
|
|
- inner.rightAnchor.constraint(equalTo: rightAnchor),
|
|
|
- inner.topAnchor.constraint(equalTo: topAnchor),
|
|
|
- inner.bottomAnchor.constraint(equalTo: bottomAnchor)
|
|
|
+ inner.leadingAnchor.constraint(equalTo: leadingAnchor, constant: ProfileEntryCardLayout.horizontalInset),
|
|
|
+ inner.trailingAnchor.constraint(equalTo: trailingAnchor, constant: -ProfileEntryCardLayout.horizontalInset),
|
|
|
+ inner.topAnchor.constraint(equalTo: topAnchor, constant: 16),
|
|
|
+ inner.bottomAnchor.constraint(equalTo: bottomAnchor, constant: -16)
|
|
|
])
|
|
|
}
|
|
|
|
|
|
@@ -1255,17 +1260,17 @@ private final class EducationEntryView: NSView {
|
|
|
inner.spacing = 14
|
|
|
inner.alignment = .leading
|
|
|
inner.translatesAutoresizingMaskIntoConstraints = false
|
|
|
- inner.edgeInsets = NSEdgeInsets(top: 14, left: 18, bottom: 14, right: 18)
|
|
|
+ inner.edgeInsets = NSEdgeInsets()
|
|
|
inner.userInterfaceLayoutDirection = .leftToRight
|
|
|
ProfileLayoutEnforcement.applyForcedLTR(to: inner)
|
|
|
inner.pinAllArrangedSubviewWidthsEqualToStackWidth()
|
|
|
|
|
|
addSubview(inner)
|
|
|
NSLayoutConstraint.activate([
|
|
|
- inner.leftAnchor.constraint(equalTo: leftAnchor),
|
|
|
- inner.rightAnchor.constraint(equalTo: rightAnchor),
|
|
|
- inner.topAnchor.constraint(equalTo: topAnchor),
|
|
|
- inner.bottomAnchor.constraint(equalTo: bottomAnchor)
|
|
|
+ inner.leadingAnchor.constraint(equalTo: leadingAnchor, constant: ProfileEntryCardLayout.horizontalInset),
|
|
|
+ inner.trailingAnchor.constraint(equalTo: trailingAnchor, constant: -ProfileEntryCardLayout.horizontalInset),
|
|
|
+ inner.topAnchor.constraint(equalTo: topAnchor, constant: 14),
|
|
|
+ inner.bottomAnchor.constraint(equalTo: bottomAnchor, constant: -14)
|
|
|
])
|
|
|
}
|
|
|
|