diff --git a/Sparkle/SUStatus.xib b/Sparkle/SUStatus.xib index fca3d15d..d225d6c2 100644 --- a/Sparkle/SUStatus.xib +++ b/Sparkle/SUStatus.xib @@ -10,6 +10,7 @@ + diff --git a/Sparkle/SUStatusController.h b/Sparkle/SUStatusController.h index 8a279258..03407c87 100644 --- a/Sparkle/SUStatusController.h +++ b/Sparkle/SUStatusController.h @@ -15,6 +15,7 @@ @interface SUStatusController : SUWindowController @property (weak) IBOutlet NSButton *actionButton; @property (weak) IBOutlet NSProgressIndicator *progressBar; +@property (weak) IBOutlet NSTextField *statusTextField; @property (copy) NSString *statusText; @property double progressValue; diff --git a/Sparkle/SUStatusController.m b/Sparkle/SUStatusController.m index 290bfeae..23363248 100644 --- a/Sparkle/SUStatusController.m +++ b/Sparkle/SUStatusController.m @@ -11,6 +11,7 @@ #import "SUAppcast.h" #import "SUAppcastItem.h" #import "SUVersionComparisonProtocol.h" +#import "SUOperatingSystem.h" #import "SUStatusController.h" #import "SUHost.h" @@ -28,6 +29,7 @@ @synthesize host; @synthesize actionButton; @synthesize progressBar; +@synthesize statusTextField; - (instancetype)initWithHost:(SUHost *)aHost { @@ -51,6 +53,13 @@ [[self window] center]; [[self window] setFrameAutosaveName:@"SUStatusFrame"]; [self.progressBar setUsesThreadedAnimation:YES]; + + if ([SUOperatingSystem isOperatingSystemAtLeastVersion:(NSOperatingSystemVersion){10, 11, 0}]) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wpartial-availability" + [self.statusTextField setFont:[NSFont monospacedDigitSystemFontOfSize:0 weight:NSFontWeightRegular]]; +#pragma clang diagnostic pop + } } - (NSString *)windowTitle diff --git a/Sparkle/SUUIBasedUpdateDriver.m b/Sparkle/SUUIBasedUpdateDriver.m index 67782212..c13d5b84 100644 --- a/Sparkle/SUUIBasedUpdateDriver.m +++ b/Sparkle/SUUIBasedUpdateDriver.m @@ -167,8 +167,9 @@ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wpartial-availability" - return [NSByteCountFormatter stringFromByteCount:value - countStyle:NSByteCountFormatterCountStyleFile]; + NSByteCountFormatter *formatter = [[NSByteCountFormatter alloc] init]; + [formatter setZeroPadsFractionDigits:YES]; + return [formatter stringFromByteCount:value]; #pragma clang diagnostic pop }