Fix titlebar folder icon briefly enlarging on workspace switch (#81)
This commit is contained in:
parent
fe082cd213
commit
88ee368f78
1 changed files with 8 additions and 2 deletions
|
|
@ -2290,16 +2290,22 @@ private final class DraggableFolderNSView: NSView, NSDraggingSource {
|
|||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
|
||||
override var intrinsicContentSize: NSSize {
|
||||
NSSize(width: 16, height: 16)
|
||||
}
|
||||
|
||||
private func setupImageView() {
|
||||
imageView = NSImageView()
|
||||
imageView.imageScaling = .scaleProportionallyUpOrDown
|
||||
imageView.imageScaling = .scaleProportionallyDown
|
||||
imageView.translatesAutoresizingMaskIntoConstraints = false
|
||||
addSubview(imageView)
|
||||
NSLayoutConstraint.activate([
|
||||
imageView.leadingAnchor.constraint(equalTo: leadingAnchor),
|
||||
imageView.trailingAnchor.constraint(equalTo: trailingAnchor),
|
||||
imageView.topAnchor.constraint(equalTo: topAnchor),
|
||||
imageView.bottomAnchor.constraint(equalTo: bottomAnchor)
|
||||
imageView.bottomAnchor.constraint(equalTo: bottomAnchor),
|
||||
imageView.widthAnchor.constraint(equalToConstant: 16),
|
||||
imageView.heightAnchor.constraint(equalToConstant: 16),
|
||||
])
|
||||
updateIcon()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue