From 246326c5b4b926f23c69a6cbf988769b85c9ef98 Mon Sep 17 00:00:00 2001 From: Sven Weidauer Date: Mon, 26 Jun 2017 20:27:45 +0200 Subject: Use window background color for history popover. --- frontends/cocoa/ArrowBox.m | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) 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]; -- cgit v1.2.3