diff options
author | Sven Weidauer <sven@5sw.de> | 2017-06-26 20:27:45 +0200 |
---|---|---|
committer | Sven Weidauer <sven@5sw.de> | 2017-06-26 20:27:45 +0200 |
commit | 246326c5b4b926f23c69a6cbf988769b85c9ef98 (patch) | |
tree | c60f4e71b5632abe24711249756e92bc54ed606b | |
parent | 80075c9368a76b2445900d7dc56d3d6c7cc0ee2d (diff) | |
download | netsurf-246326c5b4b926f23c69a6cbf988769b85c9ef98.tar.gz netsurf-246326c5b4b926f23c69a6cbf988769b85c9ef98.tar.bz2 |
Use window background color for history popover.
-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]; |