NSSegmentControl Images Scaling Not Working

Hello,


The problem appears specifically when I use a NSSegmentControl and in the segments inside I place images (set via StoryBoard). Furthermore it only happens when using a Retina MacBook and if you're NOT connected to a second monitor.


When the above conditions are met the images render at larger sizes than they should. You can reproduce the problem by creating a new Project in xcode, dropping a NSSegmentControl in its ToolBar and then adding an image, like "NSBonjour" or "NSCaution". It does not happen for some other images like "NSStatusNone"


I believe this may be a bug, problem is I'm not entirely sure and how can I fix this in my app. I have no idea and found no information online.


Any help appreciated,


Thanks!


Marc


Link to StackOverflow, where I could upload images: http://stackoverflow.com/questions/42057389/nssegmentcontrol-images-scaling-not-working

Replies

I've found the problem, apparently images in segmented control must have different image sizes vs. normal buttons.

They should be:

19x19 at 1x

38x38 at 2x

57x57 at 3x

Hope this helps future devs.

Regards,

Marc