-
-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use color scheme based on OS system dark/light mode preferences #1233
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Documentation is missing :)
@Yaraslaut I sadly didn't decide yet how the configuration should look like. What you see is my proposal. But if you have an idea on how it could be done better, I'm absolutely open - then of course we must document that within this PR as well :) |
74881d9
to
520d80a
Compare
MacOS bits as provided by @uspasojevic96: #import <Cocoa/Cocoa.h>
- (BOOL)isDarkMode {
NSAppearance *currentAppearance = [NSAppearance currentAppearance];
if (currentAppearance) {
// Check if the current appearance is dark
if (@available(macOS 10.14, *)) {
return [currentAppearance bestMatchFromAppearancesWithNames:@[NSAppearanceNameDarkAqua]] == NSAppearanceNameDarkAqua;
}
}
// Default to light mode if appearance cannot be determined
return NO;
} For event subscription: [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(appearanceDidChange:) name:NSAppearanceDidChangeNotification object:nil]; I will probably need some help to clue that into the code base, as I've never touched ObjC/++ just yet :| |
87cd413
to
6b0d99c
Compare
3345f37
to
cfa4e5c
Compare
cfa4e5c
to
f6ae50b
Compare
bdc4742
to
d72648c
Compare
63e415e
to
66bb267
Compare
abb0e18
to
35aff73
Compare
Signed-off-by: Christian Parpart <christian@parpart.family>
Signed-off-by: Christian Parpart <christian@parpart.family>
Signed-off-by: Christian Parpart <christian@parpart.family>
Signed-off-by: Christian Parpart <christian@parpart.family>
Signed-off-by: Christian Parpart <christian@parpart.family>
…icit and unsolicited) and adds DEC mode 2031 to enable/disable unsolicited reports of that Signed-off-by: Christian Parpart <christian@parpart.family>
35aff73
to
60781dc
Compare
Closes #604
Checklist
2023-10-07.23-02-14.mp4