From 0587cad7ee2cee8d620117ade2358dba8f638c56 Mon Sep 17 00:00:00 2001 From: Lukhnos Liu Date: Sun, 9 Sep 2012 12:59:35 -0700 Subject: [PATCH] Improve icon maker. --- Source/IconMaker/BopomofoIconRenderView.m | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/Source/IconMaker/BopomofoIconRenderView.m b/Source/IconMaker/BopomofoIconRenderView.m index d0aa15cb..21a39548 100644 --- a/Source/IconMaker/BopomofoIconRenderView.m +++ b/Source/IconMaker/BopomofoIconRenderView.m @@ -100,20 +100,13 @@ if (!([self bounds].size.width > 16.0)) { [[NSColor colorWithDeviceWhite:0.6 alpha:1.0] setFill]; - [[NSColor colorWithDeviceWhite:0.6 alpha:1.0] setStroke]; } - - [[NSColor colorWithDeviceWhite:0.65 alpha:1.0] setFill]; - [[NSColor colorWithDeviceWhite:0.65 alpha:1.0] setStroke]; + else { + [[NSColor colorWithDeviceWhite:0.65 alpha:1.0] setFill]; + } + [backgroundPath fill]; - - boundsRect.size.width -= 1.0; - boundsRect.size.height -= 1.0; - boundsRect.origin.x += 0.5; - boundsRect.origin.y += 0.5; - backgroundPath = [NSBezierPath bezierPathWithRoundedRect:boundsRect xRadius:2.0 yRadius:2.0]; - [backgroundPath stroke]; - + [attrDict setObject:[NSColor colorWithDeviceWhite:1.0 alpha:1.0] forKey:NSForegroundColorAttributeName]; [attrString setAttributes:attrDict range:NSMakeRange(0, [text length])]; [attrString drawAtPoint:textOrigin];