From 29c40c62b9afa5eb3c61b8904b5213750bed558a Mon Sep 17 00:00:00 2001 From: Bibiko Date: Mon, 12 Oct 2009 10:25:07 +0000 Subject: =?UTF-8?q?=E2=80=A2=20fixed=20truncating=20issue=20of=20Pref's=20?= =?UTF-8?q?Favorite=20List=20table=20view=20-=20now=20favorite=20name/host?= =?UTF-8?q?=20will=20be=20truncated=20correctly=20-=20added=20tooltip=20fo?= =?UTF-8?q?r=20truncated=20favorites?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/SPFavoriteTextFieldCell.m | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'Source/SPFavoriteTextFieldCell.m') diff --git a/Source/SPFavoriteTextFieldCell.m b/Source/SPFavoriteTextFieldCell.m index 6011af7f..af65d28e 100644 --- a/Source/SPFavoriteTextFieldCell.m +++ b/Source/SPFavoriteTextFieldCell.m @@ -142,7 +142,10 @@ float maxWidth = cellFrame.size.width; float mainStringWidth = [mainString size].width; float subStringWidth = [subString size].width; - + + // Set a right-padding + maxWidth -= 10; + if (maxWidth < mainStringWidth) { for (i = 0; i <= [mainString length]; i++) { if ([[mainString attributedSubstringFromRange:NSMakeRange(0, i)] size].width >= maxWidth) { @@ -163,6 +166,12 @@ [subString drawInRect:subFrame]; } +// Suppress built-in tooltips +- (NSRect)expansionFrameWithFrame:(NSRect)cellFrame inView:(NSView *)view +{ + return NSMakeRect(0,0,0,0); +} + // ------------------------------------------------------------------------------- // invertFontColors // -- cgit v1.2.3