Closed alinebee closed 14 years ago
I don't remember why I did this....but there was a specific reason, lol. But yes, that is a feature I have thought about on occasion and keep putting aside, so if you would like to submit a patch I would be more than happy to accept it.
I only found that BGHUDButtonCell strips the Shadow, and as far as the reason I can't see why I had removed it, maybe it was something I left in from my testing phase and forgot to remove....I apologize.
Fixes no shadows in BGHUDButtonCell
Thanks for pointing this out. Closed by 6e11a8dddbaa63f0a8851beb7dc581f47bbd4f84
At least BGHUDTextFieldCell and BGHUDButtonCell explicitly strip the NSShadowAttributeName from attributed string values in their draw methods, just before drawing the string. This makes it prohibitively hard to give text a shadowed appearance, either by providing a custom attributed string value or by subclassing the control (without just copy-pasting the entire draw method to implement it.)
A subtle shadow helps labels with no background to stand out on translucent HUD windows, so it seems surprising to explicitly strip out custom shadows. What was the reason for this choice?
For my own project I have added a -textShadow method to BGTheme (which returns nil in the base implementation), and modified BGHUDLabel, BGHUDTextFieldCell and BGHUDButtonCell to use the return value of that when drawing text. I can submit these changes as a patch, if this feature is desired.