Fix the update dialog font, which was broken on both older and newer versions of macOS

This commit is contained in:
Lior Halphon
2024-01-06 21:49:48 +02:00
parent 226825bda4
commit 5fb6d55c67
2 changed files with 10 additions and 2 deletions

View File

@@ -285,7 +285,15 @@ static uint32_t color_to_int(NSColor *color)
dispatch_async(dispatch_get_main_queue(), ^{
NSArray *objects;
[[NSBundle mainBundle] loadNibNamed:@"UpdateWindow" owner:self topLevelObjects:&objects];
self.updateChanges.preferences.standardFontFamily = [NSFont systemFontOfSize:0].familyName;
if (@available(macOS 10.11, *)) {
self.updateChanges.preferences.standardFontFamily = @"-apple-system";
}
else if (@available(macOS 10.10, *)) {
self.updateChanges.preferences.standardFontFamily = @"Helvetica Neue";
}
else {
self.updateChanges.preferences.standardFontFamily = @"Lucida Grande";
}
self.updateChanges.preferences.fixedFontFamily = @"Menlo";
self.updateChanges.drawsBackground = false;
[self.updateChanges.mainFrame loadHTMLString:html baseURL:nil];

View File

@@ -1,6 +1,6 @@
Expat License
Copyright (c) 2015-2023 Lior Halphon
Copyright (c) 2015-2024 Lior Halphon
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal