1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-02-25 15:32:33 +00:00

display the drag window's text in the system font as opposed to hardcoding "Lucida Grande"

This commit is contained in:
Mitchell Livingston 2010-01-28 03:48:21 +00:00
parent d2e491285a
commit 2b397fe64f

View file

@ -38,9 +38,8 @@
[stringShadow setShadowOffset: NSMakeSize(2.0, -2.0)]; [stringShadow setShadowOffset: NSMakeSize(2.0, -2.0)];
[stringShadow setShadowBlurRadius: 4.0]; [stringShadow setShadowBlurRadius: 4.0];
NSFont * bigFont = [[NSFontManager sharedFontManager] convertFont: NSFont * bigFont = [NSFont boldSystemFontOfSize: 18.0],
[NSFont fontWithName: @"Lucida Grande" size: 18.0] toHaveTrait: NSBoldFontMask], * smallFont = [NSFont systemFontOfSize: 14.0];
* smallFont = [NSFont fontWithName: @"Lucida Grande" size: 14.0];
NSMutableParagraphStyle * paragraphStyle = [[NSParagraphStyle defaultParagraphStyle] mutableCopy]; NSMutableParagraphStyle * paragraphStyle = [[NSParagraphStyle defaultParagraphStyle] mutableCopy];
[paragraphStyle setLineBreakMode: NSLineBreakByTruncatingTail]; [paragraphStyle setLineBreakMode: NSLineBreakByTruncatingTail];
@ -77,11 +76,11 @@
//create badge //create badge
const NSRect badgeRect = NSMakeRect(0.0, 0.0, 325.0, 84.0); const NSRect badgeRect = NSMakeRect(0.0, 0.0, 325.0, 84.0);
NSBezierPath * bp = [NSBezierPath bezierPathWithRoundedRect: badgeRect xRadius: 15.0 yRadius: 15.0];
fBadge = [[NSImage alloc] initWithSize: badgeRect.size]; fBadge = [[NSImage alloc] initWithSize: badgeRect.size];
[fBadge lockFocus]; [fBadge lockFocus];
NSBezierPath * bp = [NSBezierPath bezierPathWithRoundedRect: badgeRect xRadius: 15.0 yRadius: 15.0];
[[NSColor colorWithCalibratedWhite: 0.0 alpha: 0.75] set]; [[NSColor colorWithCalibratedWhite: 0.0 alpha: 0.75] set];
[bp fill]; [bp fill];