diff options
| author | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2023-02-08 17:25:34 +0100 |
|---|---|---|
| committer | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2023-02-08 17:25:34 +0100 |
| commit | fc2c05420021064af5e322f5e59cf0995239349a (patch) | |
| tree | 18ea7a9d8116cf486b1d39d1885aff80a6484dad /Flat Bezel/BBBackgroundView.m | |
| parent | 5200836d4b4ca9baf0f578f7a462f27d155abff4 (diff) | |
Port BackgroundView to swift, use system darkmode
Diffstat (limited to 'Flat Bezel/BBBackgroundView.m')
| -rw-r--r-- | Flat Bezel/BBBackgroundView.m | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/Flat Bezel/BBBackgroundView.m b/Flat Bezel/BBBackgroundView.m deleted file mode 100644 index 7aff10b..0000000 --- a/Flat Bezel/BBBackgroundView.m +++ /dev/null @@ -1,24 +0,0 @@ -#import "BBBackgroundView.h" - -@implementation BBBackgroundView - -- (void)drawRect:(NSRect)rect { - rect = [self bounds]; - - NSBezierPath *roundRect = [NSBezierPath bezierPath]; - - [roundRect appendBezierPathWithRoundedRectangle:rect withRadius:8]; - [roundRect addClip]; - - BOOL darkMode = [[NSUserDefaults standardUserDefaults] boolForKey:@"QSFlatBezelDarkMode"]; - if (darkMode) { - [[NSColor colorWithRed:.1 green:.1 blue:.1 alpha:.99] set]; - } else { - [[NSColor colorWithRed:1 green:1 blue:1 alpha:.99] set]; - } - NSRectFill(rect); - - [super drawRect:rect]; -} - -@end |