aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPFavoriteTextFieldCell.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2009-10-12 10:25:07 +0000
committerBibiko <bibiko@eva.mpg.de>2009-10-12 10:25:07 +0000
commit29c40c62b9afa5eb3c61b8904b5213750bed558a (patch)
tree48001c67a67b1fe2d6db029b146cc50e59fa7a16 /Source/SPFavoriteTextFieldCell.m
parent31ddc7c313db56bd817c95e5ea9c7310f0b21ae7 (diff)
downloadsequelpro-29c40c62b9afa5eb3c61b8904b5213750bed558a.tar.gz
sequelpro-29c40c62b9afa5eb3c61b8904b5213750bed558a.tar.bz2
sequelpro-29c40c62b9afa5eb3c61b8904b5213750bed558a.zip
• fixed truncating issue of Pref's Favorite List table view
- now favorite name/host will be truncated correctly - added tooltip for truncated favorites
Diffstat (limited to 'Source/SPFavoriteTextFieldCell.m')
-rw-r--r--Source/SPFavoriteTextFieldCell.m11
1 files changed, 10 insertions, 1 deletions
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
//