Revision: 7491 http://skim-app.svn.sourceforge.net/skim-app/?rev=7491&view=rev Author: hofman Date: 2011-09-14 23:23:13 +0000 (Wed, 14 Sep 2011) Log Message: ----------- add a little shadow outline around text font in font well when the color is too white
Modified Paths: -------------- trunk/SKFontWell.m Modified: trunk/SKFontWell.m =================================================================== --- trunk/SKFontWell.m 2011-09-14 15:26:31 UTC (rev 7490) +++ trunk/SKFontWell.m 2011-09-14 23:23:13 UTC (rev 7491) @@ -506,6 +506,12 @@ if ([self hasTextColor]) { NSMutableAttributedString *attrString = [[[super attributedTitle] mutableCopy] autorelease]; [attrString addAttribute:NSForegroundColorAttributeName value:[self textColor] range:NSMakeRange(0, [attrString length])]; + if ([[[self textColor] colorUsingColorSpaceName:NSCalibratedRGBColorSpace] brightnessComponent] > 0.8) { + NSShadow *shade = [[[NSShadow alloc] init] autorelease]; + [shade setShadowColor:[NSColor blackColor]]; + [shade setShadowBlurRadius:1.0]; + [attrString addAttribute:NSShadowAttributeName value:shade range:NSMakeRange(0, [attrString length])]; + } return attrString; } else { return [super attributedTitle]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA Learn about the latest advances in developing for the BlackBerry® mobile platform with sessions, labs & more. See new tools and technologies. Register for BlackBerry® DevCon today! http://p.sf.net/sfu/rim-devcon-copy1 _______________________________________________ Skim-app-commit mailing list Skim-app-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/skim-app-commit