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
113113 return [currentOID isEqual: thisOID];
114114}
115115
116+ static BOOL isDarkMode () {
117+ return [[[NSUserDefaults standardUserDefaults ] stringForKey: @" AppleInterfaceStyle" ] isEqualToString: @" Dark" ];
118+ }
119+
116120- (void ) drawCircleInRect : (NSRect ) r
117121{
118122 long c = cellInfo.position ;
@@ -130,7 +134,11 @@ - (void) drawCircleInRect: (NSRect) r
130134 [shadow setShadowBlurRadius: 2 .0f ];
131135 [shadow set ];
132136 }
133- [[NSColor blackColor ] set ];
137+ if (isDarkMode ()) {
138+ [[NSColor whiteColor ] set ];
139+ } else {
140+ [[NSColor blackColor ] set ];
141+ }
134142 [path fill ];
135143 if (ENABLE_SHADOW && false ) {
136144 [NSGraphicsContext restoreGraphicsState ];
@@ -141,6 +149,8 @@ - (void) drawCircleInRect: (NSRect) r
141149
142150 if ( [self isCurrentCommit ] ) {
143151 [[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 ];
144154 } else {
145155 [[NSColor whiteColor ] set ];
146156 }
You can’t perform that action at this time.
0 commit comments