Revision: 27346
http://sourceforge.net/p/bibdesk/svn/27346
Author: hofman
Date: 2022-04-03 15:43:57 +0000 (Sun, 03 Apr 2022)
Log Message:
-----------
add tool tips for column headers displaying an image or a single character title
Modified Paths:
--------------
trunk/bibdesk/BDSKMainTableView.m
Modified: trunk/bibdesk/BDSKMainTableView.m
===================================================================
--- trunk/bibdesk/BDSKMainTableView.m 2022-04-03 06:30:21 UTC (rev 27345)
+++ trunk/bibdesk/BDSKMainTableView.m 2022-04-03 15:43:57 UTC (rev 27346)
@@ -761,4 +761,21 @@
return menu;
}
+- (NSString *)view:(NSView *)view stringForToolTip:(NSToolTipTag)tag
point:(NSPoint)point userData:(void *)data {
+ return [[[[self tableView] tableColumns] objectAtIndex:(NSInteger)data]
identifier];
+}
+
+- (void)resetCursorRects {
+ [self removeAllToolTips];
+ [super resetCursorRects];
+ NSArray *tcs = [[self tableView] tableColumns];
+ NSInteger i, iMax = [tcs count];
+ for (i = 0; i < iMax; i++) {
+ NSTableHeaderCell *headerCell = [[tcs objectAtIndex:i] headerCell];
+ if ([headerCell image] || [[headerCell stringValue] length] < 2)
+ [self addToolTipRect:[self headerRectOfColumn:i] owner:self
userData:(void *)i];
+ }
+
+}
+
@end
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit