diff --git a/AppKit/NSButton.m b/AppKit/NSButton.m index 155ea5da..25a9c544 100644 --- a/AppKit/NSButton.m +++ b/AppKit/NSButton.m @@ -250,6 +250,10 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI } } +- (NSColor *) _borderColorForNSShowAllViews { + return [NSColor cyanColor]; +} + @end @implementation NSButton (BindingSupport) diff --git a/AppKit/NSThemeFrame.m b/AppKit/NSThemeFrame.m index e7ff63e6..320b7c2f 100644 --- a/AppKit/NSThemeFrame.m +++ b/AppKit/NSThemeFrame.m @@ -35,6 +35,10 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI [self setNeedsDisplay:YES]; } +- (NSColor *) _borderColorForNSShowAllViews { + return [NSColor yellowColor]; +} + -(void)drawRect:(NSRect)rect { NSRect bounds=[self bounds]; CGFloat cheatSheet = 0; diff --git a/AppKit/NSView.m b/AppKit/NSView.m index 76737233..e2836f7c 100644 --- a/AppKit/NSView.m +++ b/AppKit/NSView.m @@ -47,10 +47,17 @@ NSString * const NSViewFocusDidChangeNotification=@"NSViewFocusDidChangeNotifica @implementation NSView -static BOOL NSViewLayersEnabled=NO; +static BOOL NSViewLayersEnabled = NO; +static BOOL NSShowAllViews = NO; -+(void)initialize { - NSViewLayersEnabled=[[NSUserDefaults standardUserDefaults] boolForKey:@"NSViewLayersEnabled"]; ++ (void) initialize { + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + NSViewLayersEnabled = [defaults boolForKey: @"NSViewLayersEnabled"]; + NSShowAllViews = [defaults boolForKey: @"NSShowAllViews"]; +} + +- (NSColor *) _borderColorForNSShowAllViews { + return [NSColor orangeColor]; } +(NSView *)focusView { @@ -2049,8 +2056,13 @@ static NSGraphicsContext *graphicsContextForView(NSView *view){ [[NSColor yellowColor] set]; NSRectFill(rect); } - else - [self drawRect:rect]; + else { + [self drawRect:rect]; + if (NSShowAllViews) { + [[self _borderColorForNSShowAllViews] set]; + NSFrameRect(rect); + } + } [self unlockFocus];