У меня есть вопрос о NSStatusItem
для cocoa в mac osx. Если вы посмотрите на приложение mac, называемое фрагментами (см. Фильм в http://snippetsapp.com/). вы увидите, что после того, как вы нажмете на значок своей панели состояния, что идеально выровненное представление/панель или, возможно, даже окна появляются чуть ниже значка.
Мой вопрос... Как рассчитать положение, где разместить NSWindow
, как это делает приложение?
Я пробовал следующее:
- Подкласс
NSMenu
- Установите элемент popery для первого элемента меню (работает, но достаточно)
- Использование addSubview вместо значка до
NSStatusItem
, это сработало, но не могло быть выше 20px