summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Weidauer <sven@5sw.de>2017-06-26 18:27:45 (GMT)
committer Sven Weidauer <sven@5sw.de>2017-06-26 18:27:45 (GMT)
commit246326c5b4b926f23c69a6cbf988769b85c9ef98 (patch)
treec60f4e71b5632abe24711249756e92bc54ed606b
parent80075c9368a76b2445900d7dc56d3d6c7cc0ee2d (diff)
downloadnetsurf-246326c5b4b926f23c69a6cbf988769b85c9ef98.tar.gz
netsurf-246326c5b4b926f23c69a6cbf988769b85c9ef98.tar.bz2
Use window background color for history popover.
-rw-r--r--frontends/cocoa/ArrowBox.m22
1 files changed, 21 insertions, 1 deletions
diff --git a/frontends/cocoa/ArrowBox.m b/frontends/cocoa/ArrowBox.m
index 258a58c..6d6911d 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];