Fix titlebar folder icon briefly enlarging on workspace switch (#81)

This commit is contained in:
Lawrence Chen 2026-02-18 19:05:57 -08:00 committed by GitHub
parent fe082cd213
commit 88ee368f78
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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()
}