Skip to content

Commit ea60f07

Browse files
committed
Replace Menlo with SF Mono; fix commit color
1 parent 055af28 commit ea60f07

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

Classes/Controllers/PBGitCommitController.m

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,6 @@ - (void)awakeFromNib
7575

7676
commitMessageView.repository = self.repository;
7777
commitMessageView.delegate = self;
78-
79-
[commitMessageView setTypingAttributes:[NSDictionary dictionaryWithObject:[NSFont fontWithName:@"Menlo" size:12.0] forKey:NSFontAttributeName]];
8078

8179
[unstagedFilesController setFilterPredicate:[NSPredicate predicateWithFormat:@"hasUnstagedChanges == 1"]];
8280
[stagedFilesController setFilterPredicate:[NSPredicate predicateWithFormat:@"hasStagedChanges == 1"]];

Classes/Views/PBCommitMessageView.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ - (void) awakeFromNib
3333
forKeyPath:@"PBCommitMessageViewVerticalBodyLineLength"
3434
options:NSKeyValueObservingOptionNew
3535
context:NULL];
36+
37+
self.font = [NSFont fontWithName:@"SF Mono" size:12.0] ?: [NSFont fontWithName:@"Menlo" size:12.0];
3638
}
3739

3840
- (void)dealloc
@@ -55,7 +57,7 @@ - (void)drawRect:(NSRect)aRect
5557

5658
if ([PBGitDefaults commitMessageViewHasVerticalLine]) {
5759

58-
CGFloat characterWidth = [@" " sizeWithAttributes:[self typingAttributes]].width;
60+
CGFloat characterWidth = [@" " sizeWithAttributes:@{NSFontAttributeName: self.font}].width;
5961
CGFloat lineWidth = characterWidth * [PBGitDefaults commitMessageViewVerticalLineLength];
6062
NSRect line;
6163
CGFloat padding;

Resources/html/css/GitX.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ table {
2828
}
2929

3030
.SHA {
31-
font-family: Menlo, Monaco, monospace;
31+
font-family: "SF Mono", "Menlo", Monaco, monospace;
3232
text-decoration: none;
3333
}
3434

Resources/html/css/diff.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
.diff .file .diffContent {
1717
white-space: pre;
18-
font-family: Menlo, Monaco, monospace;
18+
font-family: "SF Mono", "Menlo", Monaco, monospace;
1919
}
2020

2121
.diff .file .diffcontent .lineno {

Resources/html/views/blame/blame.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ p{
2020
margin: 0 !important;
2121
padding: 0 !important;
2222
font-size: 11px;
23-
font-family: Menlo, Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;
23+
font-family: "SF Mono", "Menlo", Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;
2424
white-space: nowrap;
2525
}
2626

2727
pre{
2828
font-size: 1em;
29-
font-family: Menlo, Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;
29+
font-family: "SF Mono", "Menlo", Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;
3030
}
3131

3232
tr.block.l3 p.summary,

Resources/html/views/history/history.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ a.servicebutton:hover {
9393
}
9494

9595
#message {
96-
font-family: Menlo, Monaco, monospace;
96+
font-family: "SF Mono", "Menlo", Monaco, monospace;
9797
font-size: 12px;
9898
white-space: pre-wrap;
9999
padding: 10px;
@@ -109,7 +109,7 @@ a.servicebutton:hover {
109109
}
110110

111111
#details {
112-
font-family: Menlo, Monaco, monospace;
112+
font-family: "SF Mono", "Menlo", Monaco, monospace;
113113
font-size: 10px;
114114
overflow: hidden;
115115
width: 600px;

0 commit comments

Comments
 (0)