Skip to content
Snippets Groups Projects
Commit a5b1060a authored by George Nachman's avatar George Nachman
Browse files

Draw tab color in white if the window appearance is dark. This happens to work...

Draw tab color in white if the window appearance is dark. This happens to work for the main menu (it has a window!) as well as the context menu on a tab. Issue 6286.
parent d1d0c11b
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -162,8 +162,7 @@ enum {
while (rootMenu.supermenu) {
rootMenu = rootMenu.supermenu;
}
if (rootMenu == [NSApp mainMenu] &&
[[[NSUserDefaults standardUserDefaults] stringForKey:@"AppleInterfaceStyle"] isEqualToString:@"Dark"]) {
if ([self darkTheme]) {
attributes[NSForegroundColorAttributeName] = [NSColor whiteColor];
}
 
Loading
Loading
@@ -172,6 +171,10 @@ enum {
[NSBezierPath setDefaultLineWidth:savedWidth];
}
 
- (BOOL)darkTheme {
return [self.window.appearance.name isEqual:NSAppearanceNameVibrantDark];
}
- (void)mouseUp:(NSEvent*) event {
NSPoint mousePoint = [self convertPoint:[[self window] mouseLocationOutsideOfEventStream] fromView:nil];
NSMenuItem* mitem = [self enclosingMenuItem];
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment