When Scintilla is compiled with Xcode 10, it automatically adjusts to the system appearance mode (dark mode vs. light mode). But the InfoBar uses a fixed color background, which renders the white text unreadable when the system is in dark mode.
I have tested a simple fix in which InfoBar draws a solid background in the controlBackgroundColor, which tracks dark/light mode. Then the gradient is drawn over it. I have replaced the InfoBar background resources (info_bar_bg.png and info_bar_bg@2x.png) with translucent equivalents (attached to this report). The InfoBar drawRect method requires a slight change:
/**
* Fill the background.
*/
- (void) drawRect: (NSRect) rect {
[[NSColor controlBackgroundColor] set];
[NSBezierPath fillRect: rect];
// Since the background is seamless, we don't need to take care for the proper offset.
// Simply tile the background over the invalid rectangle.
if (mBackground.size.width != 0) {
NSPoint target = {rect.origin.x, 0};
while (target.x < rect.origin.x + rect.size.width) {
[mBackground drawAtPoint: target fromRect: NSZeroRect operation: NSCompositingOperationSourceOver fraction: 1];
target.x += mBackground.size.width;
}
}
The controlBackgroundColor background fill is done first and the gradient compositing mode is changed from NSCompositingOperationCopy to NSCompositingOperationSourceOver.
This changes the appearance a little - there is a heavier 'bulge' and no top separator line in light mode.
I don't personally use the info bar so have no strong preference but others may.
Here is another pair of PNGs that reduces the bulge and adds back the separator line. I used the Digital Color Meter tool to get a much closer match to the original background.
Committed as [2f5d50].
Related
Commit: [2f5d50]