How to achieve the recessed text style as in Apple's Messages for Mac?
Posted
by
Thruth
on Stack Overflow
See other posts from Stack Overflow
or by Thruth
Published on 2012-04-14T17:12:01Z
Indexed on
2012/04/14
17:29 UTC
Read the original article
Hit count: 291
I'd like to replicate the recessed text style of Messages/iMessage, or, the text "white-shadow" style on a light gray background. Please refer to an image here for the style I desire.
As you can see, the texts are with "white-shadow" even on the light gray background. The bold texts do have subpixel rendering while the gray texts don't (by design?).
I've tried setBackgroundStyle:NSBackgroundStyleRaised . However it was generating shadows darker than the background. setBackgroundStyle:NSBackgroundStyleLowered was worse that it even overrode my font colour setting.
So, what is the right way to do this? Any tricks or just have to subclass NSTextFields ? Thanks.
© Stack Overflow or respective owner