Found the answer! Turns out I had an additional copy of Avenir installed on my Mac which nobody else had. That Avenir has different metrics associated with it, and once I disabled the non-system-provided Avenir, my Mac is now showing the same screwed-up layout as every other computer does. Yay?
NSTextFields Positioned Lower On Other Macs
-
26-06-2022 - |
Question
This is a weird situation. In Xcode's IB, I have a NSTableCellView subclass that I've built. It looks like this:
And when I run the app on my Mac, it comes out exactly as I would expect:
However, if any other Mac runs my app, every text field drops by something between 5-10 pixels:
Notice how the image view on the top right, and the hairline separator remain correctly positioned. This is just the text fields.
My brain balks at solving this because I can't guess what the cause is: my Mac is retina (hence right now the larger-looking image from my Mac) but I spend most of my time developing on a non-retina LED cinema display. I've tested this on three other Macs than my own, and the results are the same; it seems my own Mac is the outlier.
Any guesses as to the cause of this layout discrepancy?
UPDATE: I am using springs and struts to lay out the app. But I also tried using AutoLayout on one of my NIBs in case that was related. But the results were identical.
Solution