Revert "[kit] Attempt to make the color wells equal width"
This reverts commit 4f58d088c2
.
This commit is contained in:
parent
4f58d088c2
commit
b73e4c7af1
1 changed files with 0 additions and 10 deletions
|
@ -76,23 +76,13 @@ class PreferencesViewController: NSViewController {
|
||||||
])
|
])
|
||||||
|
|
||||||
colorStackView.addArrangedSubview(styleMenu)
|
colorStackView.addArrangedSubview(styleMenu)
|
||||||
var firstColorView: ColorView? = nil
|
|
||||||
var constraints = [NSLayoutConstraint]()
|
|
||||||
for i in 0..<4 {
|
for i in 0..<4 {
|
||||||
let colorView = ColorView()
|
let colorView = ColorView()
|
||||||
colorView.translatesAutoresizingMaskIntoConstraints = false
|
colorView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
colorView.label.stringValue = "Color \(i+1)"
|
colorView.label.stringValue = "Color \(i+1)"
|
||||||
colorStackView.addArrangedSubview(colorView)
|
colorStackView.addArrangedSubview(colorView)
|
||||||
colorViews.append(colorView)
|
colorViews.append(colorView)
|
||||||
|
|
||||||
if let firstColorView = firstColorView {
|
|
||||||
let constraint = colorView.widthAnchor.constraint(equalTo: firstColorView.widthAnchor, multiplier: 1)
|
|
||||||
constraints.append(constraint)
|
|
||||||
} else {
|
|
||||||
firstColorView = colorView
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
NSLayoutConstraint.activate(constraints)
|
|
||||||
|
|
||||||
self.view = view
|
self.view = view
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue