From 88ee368f785dfbcada1a37d363baac2414dacab2 Mon Sep 17 00:00:00 2001 From: Lawrence Chen <54008264+lawrencecchen@users.noreply.github.com> Date: Wed, 18 Feb 2026 19:05:57 -0800 Subject: [PATCH] Fix titlebar folder icon briefly enlarging on workspace switch (#81) --- Sources/ContentView.swift | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Sources/ContentView.swift b/Sources/ContentView.swift index d7682952..ee65946f 100644 --- a/Sources/ContentView.swift +++ b/Sources/ContentView.swift @@ -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() }