From: Mitchell Livingston Date: Thu, 1 Apr 2010 02:34:29 +0000 (+0000) Subject: make text fields truncate in the middle instead of end X-Git-Tag: 2.00~283 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=def9a6aba3f01f1602fb4b0c3640322f3504adb0;p=transmission make text fields truncate in the middle instead of end --- diff --git a/macosx/DragOverlayView.m b/macosx/DragOverlayView.m index 2affa725a..308439b35 100644 --- a/macosx/DragOverlayView.m +++ b/macosx/DragOverlayView.m @@ -42,7 +42,7 @@ * smallFont = [NSFont systemFontOfSize: 14.0]; NSMutableParagraphStyle * paragraphStyle = [[NSParagraphStyle defaultParagraphStyle] mutableCopy]; - [paragraphStyle setLineBreakMode: NSLineBreakByTruncatingTail]; + [paragraphStyle setLineBreakMode: NSLineBreakByTruncatingMiddle]; fMainLineAttributes = [[NSDictionary alloc] initWithObjectsAndKeys: [NSColor whiteColor], NSForegroundColorAttributeName, diff --git a/macosx/FileNameCell.m b/macosx/FileNameCell.m index df08a742f..a4abd529b 100644 --- a/macosx/FileNameCell.m +++ b/macosx/FileNameCell.m @@ -54,7 +54,7 @@ if ((self = [super init])) { NSMutableParagraphStyle * paragraphStyle = [[NSParagraphStyle defaultParagraphStyle] mutableCopy]; - [paragraphStyle setLineBreakMode: NSLineBreakByTruncatingTail]; + [paragraphStyle setLineBreakMode: NSLineBreakByTruncatingMiddle]; fTitleAttributes = [[NSMutableDictionary alloc] initWithObjectsAndKeys: [NSFont messageFontOfSize: 12.0], NSFontAttributeName, diff --git a/macosx/ProgressGradients.m b/macosx/ProgressGradients.m index 8f824c15a..6b11a6d47 100644 --- a/macosx/ProgressGradients.m +++ b/macosx/ProgressGradients.m @@ -28,7 +28,7 @@ + (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]; diff --git a/macosx/TorrentCell.m b/macosx/TorrentCell.m index eef575601..0a293e39c 100644 --- a/macosx/TorrentCell.m +++ b/macosx/TorrentCell.m @@ -99,7 +99,7 @@ fDefaults = [NSUserDefaults standardUserDefaults]; NSMutableParagraphStyle * paragraphStyle = [[NSParagraphStyle defaultParagraphStyle] mutableCopy]; - [paragraphStyle setLineBreakMode: NSLineBreakByTruncatingTail]; + [paragraphStyle setLineBreakMode: NSLineBreakByTruncatingMiddle]; fTitleAttributes = [[NSMutableDictionary alloc] initWithCapacity: 3]; [fTitleAttributes setObject: [NSFont messageFontOfSize: 12.0] forKey: NSFontAttributeName];