File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -18,8 +18,11 @@ - (id)initWithFrame:(NSRect)frame
1818 NSObject *DVTFontAndColorTheme = [NSClassFromString (@" DVTFontAndColorTheme" ) performSelector: @selector (currentTheme )];
1919 NSColor *backgroundColor = [DVTFontAndColorTheme performSelector: @selector (sourceTextBackgroundColor )];
2020
21+ // for some reason we have to do this dance to avoid a crash with the default theme??
22+ NSColor *bacon = [backgroundColor colorUsingColorSpace: [NSColorSpace deviceRGBColorSpace ]];
23+
2124 // sets the selectionColor to the inverse of the brightnessComponent of the currently selected theme's backgroundColor
22- [self setSelectionColor: [NSColor colorWithCalibratedHue: 0 .0f saturation: 0 .0f brightness: (1 .0f - [backgroundColor brightnessComponent ]) alpha: 0 .25f ]];
25+ [self setSelectionColor: [NSColor colorWithCalibratedHue: 0 .0f saturation: 0 .0f brightness: (1 .0f - [bacon brightnessComponent ]) alpha: 0 .25f ]];
2326
2427 }
2528 return self;
You can’t perform that action at this time.
0 commit comments