Recently, control alignment between Mac and Windows seems to have gone completely off the rails. I don’t know if this is the fault of new versions of the two OSs or what, but it’s a sad state of affairs and I don’t remember it being this bad in past years.
I have a simple ContainerControl with a label, a PopUpMenu, and a Canvas. The label and PopUp both use the default System font with no size specified. If I get them all lined up nicely in the vertical axis on MacOS, they are horribly misaligned under Windows, and vice-versa. Looks like time for a whole bunch of ugly #IFTARGETs
Moving the PopupMenu down 8 points under Windows restores alignment pretty well. FWIW, the Popup’s height is 30 rather than the default of 20, but when I make it 20 the cross-platform alignment is still off.
I worked on this at one point and found that running the same app on multiple versions of macOS and Windows resulted in different alignments in almost all cases. Apple certainly assumes that you’re using baseline constraints (which Xojo does not) and Windows… the only way I was ever able to get things right was to eyeball it.
It should be possible to create a method that you’d run on a window or container that would make th we adjustments for you, but it would have to be Xojo-version specific as they’ve made adjustments over the years.