From c24a22e18ce1142bf370d753d76ed2fbfd4df4ab Mon Sep 17 00:00:00 2001 From: Damiano Galassi Date: Tue, 30 Jul 2019 10:29:01 +0200 Subject: MacGui: set the progress labels to a monospaced digit font. --- macosx/HBQueueInfoViewController.m | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'macosx/HBQueueInfoViewController.m') diff --git a/macosx/HBQueueInfoViewController.m b/macosx/HBQueueInfoViewController.m index 3b8a6e247..0521ccc04 100644 --- a/macosx/HBQueueInfoViewController.m +++ b/macosx/HBQueueInfoViewController.m @@ -40,6 +40,8 @@ - (void)setUpObservers { + // It would be easier to just KVO the item state property, + // But we can't because the item is a NSProxy. NSNotificationCenter * __weak center = NSNotificationCenter.defaultCenter; [center addObserverForName:HBQueueDidStartItemNotification @@ -67,6 +69,15 @@ [self updateReset]; } }]; + + [center addObserverForName:HBQueueDidChangeItemNotification + object:nil + queue:NSOperationQueue.mainQueue usingBlock:^(NSNotification * _Nonnull note) + { + [self updateLabels]; + [self updateReset]; + }]; + } - (void)updateReset -- cgit v1.2.3