diff options
Diffstat (limited to 'frontends/cocoa')
-rw-r--r-- | frontends/cocoa/ArrowBox.m | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/frontends/cocoa/ArrowBox.m b/frontends/cocoa/ArrowBox.m index 258a58cda..6d6911d9b 100644 --- a/frontends/cocoa/ArrowBox.m +++ b/frontends/cocoa/ArrowBox.m @@ -23,6 +23,15 @@ #import "ArrowBox.h" +#import "desktop/system_colour.h" +#import "cocoa/plotter.h" + +@interface ArrowBox () + +@property (nonatomic) NSColor *backgroundColor; + +@end + @implementation ArrowBox @synthesize arrowPosition; @@ -30,6 +39,17 @@ @synthesize arrowEdge; @synthesize cornerRadius; +- (NSColor *)backgroundColor { + if (!_backgroundColor) { + colour fill_colour; + nserror res = ns_system_colour_char("Window", &fill_colour); + NSAssert(res == NSERROR_OK, @"Expect to find the window colour"); + _backgroundColor = cocoa_convert_colour(fill_colour); + } + + return _backgroundColor; +} + - (void)setArrowEdge:(ArrowEdge)newEdge { if (arrowEdge == newEdge) { @@ -140,7 +160,7 @@ [path closePath]; [[NSColor colorWithDeviceWhite:1.0 alpha:0.4] set]; - [[NSColor colorWithDeviceWhite:0.0 alpha:0.75] setFill]; + [self.backgroundColor setFill]; NSAffineTransform *transform = [NSAffineTransform transform]; [transform translateXBy:bounds.origin.x yBy:bounds.origin.y]; |