From 8b11aeeaea6da16d427e6c2708f2a1ebab1b8e7e Mon Sep 17 00:00:00 2001 From: Bradley Sepos Date: Thu, 25 Jan 2018 20:41:42 -0500 Subject: MacGUI: Disable all labels when no source loaded. --- macosx/English.lproj/HBSummaryViewController.xib | 21 +++++++++++++++++++++ macosx/English.lproj/MainWindow.xib | 3 +++ macosx/HBFiltersViewController.m | 4 ++++ macosx/HBSummaryViewController.m | 6 ++++++ 4 files changed, 34 insertions(+) (limited to 'macosx') diff --git a/macosx/English.lproj/HBSummaryViewController.xib b/macosx/English.lproj/HBSummaryViewController.xib index d91afc97e..f1922f3a0 100644 --- a/macosx/English.lproj/HBSummaryViewController.xib +++ b/macosx/English.lproj/HBSummaryViewController.xib @@ -59,6 +59,9 @@ + + + @@ -67,6 +70,9 @@ + + + @@ -75,6 +81,9 @@ + + + @@ -87,6 +96,9 @@ + + + @@ -96,6 +108,9 @@ + + + @@ -108,6 +123,9 @@ + + + @@ -117,6 +135,9 @@ + + + diff --git a/macosx/English.lproj/MainWindow.xib b/macosx/English.lproj/MainWindow.xib index 418333c22..95680f961 100644 --- a/macosx/English.lproj/MainWindow.xib +++ b/macosx/English.lproj/MainWindow.xib @@ -112,6 +112,9 @@ + + + diff --git a/macosx/HBFiltersViewController.m b/macosx/HBFiltersViewController.m index ac7d75bc1..77139d6ec 100644 --- a/macosx/HBFiltersViewController.m +++ b/macosx/HBFiltersViewController.m @@ -19,6 +19,10 @@ - (instancetype)init { self = [super initWithNibName:@"HBFiltersViewController" bundle:nil]; + if (self) + { + _labelColor = [NSColor disabledControlTextColor]; + } return self; } diff --git a/macosx/HBSummaryViewController.m b/macosx/HBSummaryViewController.m index 5b9beef75..053660d68 100644 --- a/macosx/HBSummaryViewController.m +++ b/macosx/HBSummaryViewController.m @@ -34,6 +34,8 @@ static void *HBSummaryViewControllerSubsContext = &HBSummaryViewControllerSubsCo @property (nonatomic) BOOL filtersReloadInQueue; @property (nonatomic) BOOL pictureReloadInQueue; +@property (nonatomic, readwrite) NSColor *labelColor; + @end @implementation HBSummaryViewController @@ -43,6 +45,8 @@ static void *HBSummaryViewControllerSubsContext = &HBSummaryViewControllerSubsCo self = [super initWithNibName:@"HBSummaryViewController" bundle:nil]; if (self) { + _labelColor = [NSColor disabledControlTextColor]; + _previewViewController = [[HBPreviewViewController alloc] init]; } return self; @@ -66,6 +70,7 @@ static void *HBSummaryViewControllerSubsContext = &HBSummaryViewControllerSubsCo { if (job) { + self.labelColor = [NSColor controlTextColor]; [self removeJobObservers]; _job = job; [self addJobObservers]; @@ -75,6 +80,7 @@ static void *HBSummaryViewControllerSubsContext = &HBSummaryViewControllerSubsCo } else { + self.labelColor = [NSColor disabledControlTextColor]; [self removeJobObservers]; [self resetLabels]; _job = job; -- cgit v1.2.3