Updated to current HNHUI for dark mode support for macOS 10.14

This commit is contained in:
Michael Starke
2018-09-19 17:40:37 +02:00
parent bcbeb2e43e
commit 8d7bb31b7c
35 changed files with 287 additions and 113 deletions

View File

@@ -47,6 +47,7 @@ typedef NS_ENUM(NSUInteger, MPContextTab) {
@property (nonatomic, assign) MPContextTab activeTab;
/* Filter */
@property (weak) IBOutlet HNHUIGradientView *searchBar;
@property (weak) IBOutlet NSButton *filterDoneButton;
@property (weak) IBOutlet NSTextField *filterLabelTextField;
/* History */
@@ -78,12 +79,19 @@ typedef NS_ENUM(NSUInteger, MPContextTab) {
self.filterLabelTextField.cell.backgroundStyle = NSBackgroundStyleRaised;
/* Setup Trash Bar color */
if(!HNHUIIsRunningOnYosemiteOrNewer()) {
NSArray *activeColors = @[[NSColor colorWithCalibratedWhite:0.2 alpha:1],[NSColor colorWithCalibratedWhite:0.4 alpha:1]];
NSArray *inactiveColors = @[[NSColor colorWithCalibratedWhite:0.3 alpha:1],[NSColor colorWithCalibratedWhite:0.6 alpha:1]];
if(@available(macOS 10.13, *)) {
NSArray *activeColors = @[[NSColor colorNamed:@"Active Shadow"], [NSColor colorNamed:@"Active Highlight"], ];
NSArray *inactiveColors = @[[NSColor colorNamed:@"Inactive Shadow"], [NSColor colorNamed:@"Inactive Highlight"]];
self.historyBar.activeGradient = [[NSGradient alloc] initWithColors:activeColors];
self.searchBar.activeGradient = [[NSGradient alloc] initWithColors:activeColors];
self.trashBar.activeGradient = [[NSGradient alloc] initWithColors:activeColors];
self.historyBar.inactiveGradient = [[NSGradient alloc] initWithColors:inactiveColors];
self.trashBar.inactiveGradient = [[NSGradient alloc] initWithColors:inactiveColors];
//self.emptyTrashButton.textColor = [NSColor whiteColor];
self.searchBar.inactiveGradient = [[NSGradient alloc] initWithColors:inactiveColors];
}
else {
}
[self.view bind:NSSelectedIndexBinding toObject:self withKeyPath:NSStringFromSelector(@selector(activeTab)) options:nil];