简体   繁体   中英

NSFontPanel: Shadow color — where art thou?

Tinkering with the NSFontPanel here. It would appear that, if you resize the stock panel wide enough, you automagically get the ability to turn shadows on/off, the shadow opacity, blur, offset and direction. Even works in TextEdit.

Nice.

However, Apple's NSFontPanel implementation only has gray-scale shadows -- no color . This is despite NSShadow allowing for color.

I'd be really nice to have colored shadows.

Two questions:

1) How can one (easily) add a shadow ColorWell to the NSFontPanel? Assuming the use of the user-provided accessory view for this. Here's to hoping it can play nicely with the existing NSFontPanel toolbar layout.

2) Barring that, here's a kludge: my app will not use the background color attribute. Any thoughts on my hijacking that for my shadow color?

-- bp

也许NSUserInterfaceValidations可以提供帮助?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM