• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

TextMate is a graphical text editor for OS X 10.7+


Commit MetaInfo

Revisiond19e2fa49e4803b758f0ccdbdd38b5b3d6de0e8d (tree)
Time2012-08-23 04:15:17
AuthorGerd Knops <gerti@bita...>
CommiterAllan Odgaard

Log Message

BundleEditor: follow truncated names with ellipsis

Change Summary

Incremental Difference

--- a/Frameworks/BundleEditor/src/BundleEditor.mm
+++ b/Frameworks/BundleEditor/src/BundleEditor.mm
@@ -455,9 +455,19 @@ static be::entry_ptr parent_for_column (NSBrowser* aBrowser, NSInteger aColumn,
455455 {
456456 if(NSBrowserCell* cell = [aCell isKindOfClass:[NSBrowserCell class]] ? aCell : nil)
457457 {
458+ static NSMutableParagraphStyle* paragraphStyle = nil;
459+ if(!paragraphStyle)
460+ {
461+ paragraphStyle = [[NSMutableParagraphStyle alloc] init];
462+ [paragraphStyle setLineBreakMode:NSLineBreakByTruncatingTail];
463+ }
464+
458465 be::entry_ptr entry = parent_for_column(aBrowser, aColumn, bundles)->children()[aRow];
459-
460- NSDictionary* attrs = @{ NSForegroundColorAttributeName : entry->disabled() ? [NSColor grayColor] : [NSColor blackColor] };
466+
467+ NSDictionary* attrs = @{
468+ NSForegroundColorAttributeName : entry->disabled() ? [NSColor grayColor] : [NSColor blackColor],
469+ NSParagraphStyleAttributeName : paragraphStyle
470+ };
461471 [cell setAttributedStringValue:[[[NSAttributedString alloc] initWithString:[NSString stringWithCxxString:entry->name()] attributes:attrs] autorelease]];
462472 [cell setLeaf:!entry->has_children()];
463473 [cell setLoaded:YES];