SameBoy | Accurate GB/GBC emulator |
| download: https://git.y1.nz/archives/sameboy.tar.gz | |
| README | Files | Log | Refs | LICENSE |
Cocoa/GBSplitView.m
1 #import "GBSplitView.h"
2
3 @implementation GBSplitView
4 {
5 NSColor *_dividerColor;
6 }
7
8 - (void)setDividerColor:(NSColor *)color
9 {
10 _dividerColor = color;
11 [self setNeedsDisplay:true];
12 }
13
14 - (NSColor *)dividerColor
15 {
16 if (_dividerColor) {
17 return _dividerColor;
18 }
19 return [super dividerColor];
20 }
21
22 - (void)drawDividerInRect:(NSRect)rect
23 {
24 [self.dividerColor set];
25 NSRectFill(rect);
26 }
27
28 /* Mavericks comaptibility */
29 - (NSArray<NSView *> *)arrangedSubviews
30 {
31 if (@available(macOS 10.11, *)) {
32 return [super arrangedSubviews];
33 }
34 else {
35 return [self subviews];
36 }
37 }
38
39 @end
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.