make text fields truncate in the middle instead of end

This commit is contained in:
Mitchell Livingston 2010-04-01 02:34:29 +00:00
parent 0b758dac94
commit def9a6aba3
4 changed files with 4 additions and 4 deletions

View File

@ -42,7 +42,7 @@
* smallFont = [NSFont systemFontOfSize: 14.0]; * smallFont = [NSFont systemFontOfSize: 14.0];
NSMutableParagraphStyle * paragraphStyle = [[NSParagraphStyle defaultParagraphStyle] mutableCopy]; NSMutableParagraphStyle * paragraphStyle = [[NSParagraphStyle defaultParagraphStyle] mutableCopy];
[paragraphStyle setLineBreakMode: NSLineBreakByTruncatingTail]; [paragraphStyle setLineBreakMode: NSLineBreakByTruncatingMiddle];
fMainLineAttributes = [[NSDictionary alloc] initWithObjectsAndKeys: fMainLineAttributes = [[NSDictionary alloc] initWithObjectsAndKeys:
[NSColor whiteColor], NSForegroundColorAttributeName, [NSColor whiteColor], NSForegroundColorAttributeName,

View File

@ -54,7 +54,7 @@
if ((self = [super init])) if ((self = [super init]))
{ {
NSMutableParagraphStyle * paragraphStyle = [[NSParagraphStyle defaultParagraphStyle] mutableCopy]; NSMutableParagraphStyle * paragraphStyle = [[NSParagraphStyle defaultParagraphStyle] mutableCopy];
[paragraphStyle setLineBreakMode: NSLineBreakByTruncatingTail]; [paragraphStyle setLineBreakMode: NSLineBreakByTruncatingMiddle];
fTitleAttributes = [[NSMutableDictionary alloc] initWithObjectsAndKeys: fTitleAttributes = [[NSMutableDictionary alloc] initWithObjectsAndKeys:
[NSFont messageFontOfSize: 12.0], NSFontAttributeName, [NSFont messageFontOfSize: 12.0], NSFontAttributeName,

View File

@ -28,7 +28,7 @@
+ (NSGradient *) progressGradientForRed: (CGFloat) redComponent green: (CGFloat) greenComponent blue: (CGFloat) blueComponent + (NSGradient *) progressGradientForRed: (CGFloat) redComponent green: (CGFloat) greenComponent blue: (CGFloat) blueComponent
{ {
const CGFloat alpha = [[NSUserDefaults standardUserDefaults] boolForKey: @"SmallView"] ? 0.28 : 1.0; const CGFloat alpha = [[NSUserDefaults standardUserDefaults] boolForKey: @"SmallView"] ? 0.27 : 1.0;
NSColor * baseColor = [NSColor colorWithCalibratedRed: redComponent green: greenComponent blue: blueComponent alpha: alpha]; NSColor * baseColor = [NSColor colorWithCalibratedRed: redComponent green: greenComponent blue: blueComponent alpha: alpha];

View File

@ -99,7 +99,7 @@
fDefaults = [NSUserDefaults standardUserDefaults]; fDefaults = [NSUserDefaults standardUserDefaults];
NSMutableParagraphStyle * paragraphStyle = [[NSParagraphStyle defaultParagraphStyle] mutableCopy]; NSMutableParagraphStyle * paragraphStyle = [[NSParagraphStyle defaultParagraphStyle] mutableCopy];
[paragraphStyle setLineBreakMode: NSLineBreakByTruncatingTail]; [paragraphStyle setLineBreakMode: NSLineBreakByTruncatingMiddle];
fTitleAttributes = [[NSMutableDictionary alloc] initWithCapacity: 3]; fTitleAttributes = [[NSMutableDictionary alloc] initWithCapacity: 3];
[fTitleAttributes setObject: [NSFont messageFontOfSize: 12.0] forKey: NSFontAttributeName]; [fTitleAttributes setObject: [NSFont messageFontOfSize: 12.0] forKey: NSFontAttributeName];