Improve icon maker.
This commit is contained in:
parent
4cf94d5824
commit
0587cad7ee
|
@ -100,20 +100,13 @@
|
||||||
|
|
||||||
if (!([self bounds].size.width > 16.0)) {
|
if (!([self bounds].size.width > 16.0)) {
|
||||||
[[NSColor colorWithDeviceWhite:0.6 alpha:1.0] setFill];
|
[[NSColor colorWithDeviceWhite:0.6 alpha:1.0] setFill];
|
||||||
[[NSColor colorWithDeviceWhite:0.6 alpha:1.0] setStroke];
|
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
[[NSColor colorWithDeviceWhite:0.65 alpha:1.0] setFill];
|
[[NSColor colorWithDeviceWhite:0.65 alpha:1.0] setFill];
|
||||||
[[NSColor colorWithDeviceWhite:0.65 alpha:1.0] setStroke];
|
}
|
||||||
|
|
||||||
[backgroundPath fill];
|
[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];
|
[attrDict setObject:[NSColor colorWithDeviceWhite:1.0 alpha:1.0] forKey:NSForegroundColorAttributeName];
|
||||||
[attrString setAttributes:attrDict range:NSMakeRange(0, [text length])];
|
[attrString setAttributes:attrDict range:NSMakeRange(0, [text length])];
|
||||||
[attrString drawAtPoint:textOrigin];
|
[attrString drawAtPoint:textOrigin];
|
||||||
|
|
Loading…
Reference in New Issue