Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Would like to change the opacity for an NSPopover - is it possible?

I have an NSPopover in a Cocoa application, and since Lion - it renders as semi-transparent, so that whatever text fields, tables, etc. that it overlays - these now show through underneath it and it looks really strange. I checked the class reference docs from Apple, but there doesn't seem to be a way to change it to be opaque. The only two property values that seem to be available to specify appearance are NSPopoverAppearanceMinimal, and NSPopoverAppearanceHUD - but neither of these seem to relate to alpha or opacity. Is the only way to make an NSPopover opaque by over-riding drawRect ? or does anyone know of a better way to do it ? It seems to be available for UIPopover on iOS, but not NSPopover for Cocoa...

like image 565
ciara staggs Avatar asked Aug 14 '12 23:08

ciara staggs


1 Answers

To turn the background fully opaque, please have a look at this post:

How to change NSPopover background color include triangle part?

like image 113
Stefanf Avatar answered Oct 26 '22 22:10

Stefanf