-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NSMenu issues #19
Comments
I have not tested this, but one thing I remembered that you can try is to use a custom NSMenuItem view instead, and then use an approach analogous to #18 (subclassing |
Abandoning the default NSMenuItem for a custom view is too ugly a work-around. Absolutely everything needs to be drawn (i.e. menu tracking) and the layout won't match the rest of the menu items. I opted to use images instead which works nicely! The code is smaller too :-)
That code now results in this: |
Looks great! |
I create context menus on the fly based upon different criteria. One of these menus is a Highlight menu which has various colors to choose from. The LightTheme displays them properly regardless of the color scheme beneath the menu as follows:
However, the DarkTheme messes them up as follows:
Since menus do not have views by default, the allowsVibrancy work-around is not an option. Is this easily fixed with another work-around?
Following is a code snippet to give you an idea of how I am adding these highlight colors to the menu:
Interestingly enough, during menu tracking (when you hover the mouse over the menu items) they switch to the appropriate color.
The text was updated successfully, but these errors were encountered: