mirror of
https://github.com/textmate/textmate.git
synced 2026-04-28 03:00:34 -04:00
Include high resolution I-Beam cursor
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 2.9 KiB |
BIN
Frameworks/OakTextView/resources/IBeam white.tiff
Normal file
BIN
Frameworks/OakTextView/resources/IBeam white.tiff
Normal file
Binary file not shown.
@@ -2160,12 +2160,20 @@ static void update_menu_key_equivalents (NSMenu* menu, action_to_key_t const& ac
|
||||
|
||||
- (NSCursor*)IBeamCursor
|
||||
{
|
||||
NSCursor* ibeamRegular = [NSCursor IBeamCursor];
|
||||
|
||||
if(cf::color_is_dark(theme->styles_for_scope(document->buffer().scope(0).left, fontName, fontSize).background()))
|
||||
{
|
||||
static NSCursor* ibeamCursor = [[NSCursor alloc] initWithImage:[NSImage imageNamed:@"IBeam white" inSameBundleAsClass:[self class]] hotSpot:NSMakePoint(7, 7)];
|
||||
static NSCursor* ibeamCursor = nil;
|
||||
if(!ibeamCursor)
|
||||
{
|
||||
NSImage* ibeamWhite = [NSImage imageNamed:@"IBeam white" inSameBundleAsClass:[self class]];
|
||||
[ibeamWhite setSize:[[ibeamRegular image] size]];
|
||||
ibeamCursor = [[NSCursor alloc] initWithImage:ibeamWhite hotSpot:NSMakePoint(4, 9)];
|
||||
}
|
||||
return ibeamCursor;
|
||||
}
|
||||
return [NSCursor IBeamCursor];
|
||||
return ibeamRegular;
|
||||
}
|
||||
|
||||
- (void)resetCursorRects
|
||||
|
||||
Reference in New Issue
Block a user