Misaligned NSAttributedString in macOS NSStatusItem's button
问题 I would like to display a two-line NSAttributedString as the button title of the NSStatusItem of my macOS app. However, it seems to move the text up a few pixels and, thus, cut it off. This problem did not occur before macOS Big Sur. Workaround With some effort I managed to generate an NSImage of the text and use it as the button's image. Question Is there any way to position the NSAttributedString correctly without using an image? 来源: https://stackoverflow.com/questions/65167179/misaligned