Trouble matching the vibrant background of a Yosemite NSMenuItem containing a custom view

前端 未结 7 1290
一向
一向 2020-12-14 16:19

I am attempting to add a custom view to an NSMenuItem in the OS X 10.10 Yosemite menu bar.

The custom view is simply an NSView background with an NSTextField “label”

7条回答
  •  北荒
    北荒 (楼主)
    2020-12-14 17:17

    I've just discovered that +[NSColor keyboardFocusIndicatorColor] is the right color (on El Capitan at least), whereas the expected selectedMenuItemColor is by far too dark.

提交回复
热议问题