Skip to content

Commit

Permalink
Reuse the current attributes when setting the commit message font
Browse files Browse the repository at this point in the history
This preserves the font color for Dark mode.
  • Loading branch information
tiennou committed Nov 17, 2018
1 parent 38a58c3 commit a118470
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Classes/Controllers/PBGitCommitController.m
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,10 @@ - (void)awakeFromNib
commitMessageView.repository = self.repository;
commitMessageView.delegate = self;

[commitMessageView setTypingAttributes:[NSDictionary dictionaryWithObject:[NSFont fontWithName:@"Menlo" size:12.0] forKey:NSFontAttributeName]];

NSMutableDictionary *attrs = commitMessageView.typingAttributes.mutableCopy;
attrs[NSFontAttributeName] = [NSFont fontWithName:@"Menlo" size:12.0];
commitMessageView.typingAttributes = attrs;

[unstagedFilesController setFilterPredicate:[NSPredicate predicateWithFormat:@"hasUnstagedChanges == 1"]];
[stagedFilesController setFilterPredicate:[NSPredicate predicateWithFormat:@"hasStagedChanges == 1"]];
[trackedFilesController setFilterPredicate:[NSPredicate predicateWithFormat:@"status > 0"]];
Expand Down

0 comments on commit a118470

Please sign in to comment.