aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTableStructureLoading.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2012-08-05 23:49:18 +0000
committerrowanbeentje <rowan@beent.je>2012-08-05 23:49:18 +0000
commit6b79f6517a56c96c272cd4c2583f3431418385a9 (patch)
tree805712f5c9f1c1e78fd7c4ef3015507950b9428b /Source/SPTableStructureLoading.m
parent784641222e5d9ee521a5846682f9ec2cc4cf6a3f (diff)
downloadsequelpro-6b79f6517a56c96c272cd4c2583f3431418385a9.tar.gz
sequelpro-6b79f6517a56c96c272cd4c2583f3431418385a9.tar.bz2
sequelpro-6b79f6517a56c96c272cd4c2583f3431418385a9.zip
- Fix line breaking within the encoding dropdown, addressing a regression caused by r3766
Diffstat (limited to 'Source/SPTableStructureLoading.m')
-rw-r--r--Source/SPTableStructureLoading.m4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/SPTableStructureLoading.m b/Source/SPTableStructureLoading.m
index b790b384..d9aa6765 100644
--- a/Source/SPTableStructureLoading.m
+++ b/Source/SPTableStructureLoading.m
@@ -137,7 +137,9 @@
// Take the encoding that matches the table's encoding and gray it out
if (defaultEncodingDescription) {
NSMenuItem *tableEncodingMenuItem = [[encodingPopupCell menu] itemWithTitle:defaultEncodingDescription];
- NSDictionary *menuAttributes = [NSDictionary dictionaryWithObjectsAndKeys:[NSColor lightGrayColor], NSForegroundColorAttributeName, [NSFont systemFontOfSize: [NSFont smallSystemFontSize]], NSFontAttributeName, nil];
+ NSMutableParagraphStyle *menuStyle = [[[NSMutableParagraphStyle alloc] init] autorelease];
+ [menuStyle setLineBreakMode:NSLineBreakByTruncatingTail];
+ NSDictionary *menuAttributes = [NSDictionary dictionaryWithObjectsAndKeys:[NSColor lightGrayColor], NSForegroundColorAttributeName, [NSFont systemFontOfSize: [NSFont smallSystemFontSize]], NSFontAttributeName, menuStyle, NSParagraphStyleAttributeName, nil];
NSAttributedString *itemString = [[[NSAttributedString alloc] initWithString:defaultEncodingDescription attributes:menuAttributes] autorelease];
[[tableEncodingMenuItem onMainThread] setAttributedTitle:itemString];
}