So I had to pepper a few of these around:
// NSButton image scaling changed in 26.1 with certain SF symbols?
if (@available(macOS 26.1, *))
{
// looks better on 26.1
button.imageScaling = NSImageScaleProportionallyDown;
}
else
{
// looks better on 26.0.
button.imageScaling = NSImageScaleProportionallyUpOrDown;
}
And one of these for a symbol image...
NSImageSymbolScale symbolScale;
if (@available(macOS 26.1, *))
{
// large is too big on on 26.1 so let's go down to medium
symbolScale = NSImageSymbolScaleMedium;
}
else
{
// need large on 26.0
symbolScale = NSImageSymbolScaleLarge;
}
NSImage *symbol = // make image with symbolScale and use it in a NSButton
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: