Play Time Field: Changed how control achieves monospace numbers, and changed font
parent
0f90dd3b3e
commit
71347aab83
|
@ -22,12 +22,21 @@ NSString * formatTimer(long minutes, long seconds, unichar prefix) {
|
||||||
- (void)awakeFromNib
|
- (void)awakeFromNib
|
||||||
{
|
{
|
||||||
showTimeRemaining = [[NSUserDefaults standardUserDefaults] boolForKey:kTimerModeKey];
|
showTimeRemaining = [[NSUserDefaults standardUserDefaults] boolForKey:kTimerModeKey];
|
||||||
if (@available(macOS 10.15, *)) {
|
|
||||||
|
NSFontDescriptor * fontDesc = [[NSFont systemFontOfSize:13] fontDescriptor];
|
||||||
|
|
||||||
|
NSDictionary *fontFeatureSettings = @{NSFontFeatureTypeIdentifierKey: @(kNumberSpacingType),
|
||||||
|
NSFontFeatureSelectorIdentifierKey: @(kMonospacedNumbersSelector)
|
||||||
|
};
|
||||||
|
|
||||||
|
NSDictionary *fontFeatureAttributes = @{NSFontFeatureSettingsAttribute: @[ fontFeatureSettings ] };
|
||||||
|
|
||||||
|
fontDesc = [fontDesc fontDescriptorByAddingAttributes:fontFeatureAttributes];
|
||||||
|
|
||||||
|
NSFont * font = [NSFont fontWithDescriptor:fontDesc size:13];
|
||||||
|
|
||||||
fontAttributes =
|
fontAttributes =
|
||||||
@{NSFontAttributeName : [NSFont monospacedSystemFontOfSize:13
|
@{NSFontAttributeName : font};
|
||||||
weight:NSFontWeightMedium]};
|
|
||||||
[self update];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)update
|
- (void)update
|
||||||
|
|
Loading…
Reference in New Issue