File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -113,6 +113,10 @@ - (BOOL) isCurrentCommit
113
113
return [currentOID isEqual: thisOID];
114
114
}
115
115
116
+ static BOOL isDarkMode () {
117
+ return [[[NSUserDefaults standardUserDefaults ] stringForKey: @" AppleInterfaceStyle" ] isEqualToString: @" Dark" ];
118
+ }
119
+
116
120
- (void ) drawCircleInRect : (NSRect ) r
117
121
{
118
122
long c = cellInfo.position ;
@@ -130,7 +134,11 @@ - (void) drawCircleInRect: (NSRect) r
130
134
[shadow setShadowBlurRadius: 2 .0f ];
131
135
[shadow set ];
132
136
}
133
- [[NSColor blackColor ] set ];
137
+ if (isDarkMode ()) {
138
+ [[NSColor whiteColor ] set ];
139
+ } else {
140
+ [[NSColor blackColor ] set ];
141
+ }
134
142
[path fill ];
135
143
if (ENABLE_SHADOW && false ) {
136
144
[NSGraphicsContext restoreGraphicsState ];
@@ -141,6 +149,8 @@ - (void) drawCircleInRect: (NSRect) r
141
149
142
150
if ( [self isCurrentCommit ] ) {
143
151
[[NSColor colorWithCalibratedRed: 0Xfc /256.0 green: 0Xa6 /256.0 blue: 0X4f /256.0 alpha: 1.0 ] set ];
152
+ } else if (isDarkMode ()) {
153
+ [[NSColor blackColor ] set ];
144
154
} else {
145
155
[[NSColor whiteColor ] set ];
146
156
}
You can’t perform that action at this time.
0 commit comments