mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-11 15:37:29 +02:00
Added tool tips for tabs when tab labels are truncated
This commit is contained in:
committed by
Bjorn Winckler
parent
6e1e046cbb
commit
cf7a0a71bd
@@ -644,7 +644,10 @@
|
||||
[self removeTrackingRect:[cell cellTrackingTag]];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// nuke old tool tips
|
||||
[self removeAllToolTips];
|
||||
|
||||
// calculate number of cells to fit in control and cell widths
|
||||
float availableWidth = [self availableCellWidth];
|
||||
NSMutableArray *newWidths = [NSMutableArray arrayWithCapacity:cellCount];
|
||||
@@ -757,7 +760,11 @@
|
||||
tag = [self addTrackingRect:cellRect owner:cell userData:nil assumeInside:NO];
|
||||
[cell setCellTrackingTag:tag];
|
||||
[cell setEnabled:YES];
|
||||
|
||||
|
||||
// add tool tip if label will be truncated
|
||||
if ([cell desiredWidthOfCell] > NSWidth([cell frame]))
|
||||
[self addToolTipRect:cellRect owner:[cell stringValue] userData:NULL];
|
||||
|
||||
// selected? set tab states...
|
||||
if([[cell representedObject] isEqualTo:[tabView selectedTabViewItem]]){
|
||||
[cell setState:NSOnState];
|
||||
|
||||
Reference in New Issue
Block a user