Detect dank mode on Mac OS

This commit is contained in:
Vojtech Kral 2019-04-26 16:59:14 +02:00
parent fb0836b0b2
commit b158598393
5 changed files with 61 additions and 4 deletions

View file

@ -0,0 +1,22 @@
#import "MacDarkMode.hpp"
#import <Foundation/Foundation.h>
@implementation MacDarkMode
namespace Slic3r {
namespace GUI {
bool mac_dark_mode()
{
NSString *style = [[NSUserDefaults standardUserDefaults] stringForKey:@"AppleInterfaceStyle"];
return style && [style isEqualToString:@"Dark"];
}
}
}
@end