diff options
author | Bradley Sepos <[email protected]> | 2018-01-25 20:41:42 -0500 |
---|---|---|
committer | Bradley Sepos <[email protected]> | 2018-01-25 21:34:23 -0500 |
commit | 8b11aeeaea6da16d427e6c2708f2a1ebab1b8e7e (patch) | |
tree | f709532a8d99433785c0fba1e21b9cbe980a33e9 /macosx | |
parent | a487ba769eab36f991bf6bd2620968b1bef81201 (diff) |
MacGUI: Disable all labels when no source loaded.
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/English.lproj/HBSummaryViewController.xib | 21 | ||||
-rw-r--r-- | macosx/English.lproj/MainWindow.xib | 3 | ||||
-rw-r--r-- | macosx/HBFiltersViewController.m | 4 | ||||
-rw-r--r-- | macosx/HBSummaryViewController.m | 6 |
4 files changed, 34 insertions, 0 deletions
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 @@ <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> </textFieldCell> + <connections> + <binding destination="-2" name="textColor" keyPath="self.labelColor" id="yCO-fl-3Lt"/> + </connections> </textField> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" preferredMaxLayoutWidth="100" translatesAutoresizingMaskIntoConstraints="NO" id="GCn-2c-Fql" userLabel="Tracks"> <rect key="frame" x="18" y="251" width="45" height="14"/> @@ -67,6 +70,9 @@ <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> </textFieldCell> + <connections> + <binding destination="-2" name="textColor" keyPath="self.labelColor" id="oGS-ya-5m8"/> + </connections> </textField> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" preferredMaxLayoutWidth="100" translatesAutoresizingMaskIntoConstraints="NO" id="0kh-Uy-Yo3" userLabel="Filters"> <rect key="frame" x="18" y="221" width="45" height="14"/> @@ -75,6 +81,9 @@ <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> </textFieldCell> + <connections> + <binding destination="-2" name="textColor" keyPath="self.labelColor" id="Y59-Gp-EZi"/> + </connections> </textField> <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" preferredMaxLayoutWidth="170" translatesAutoresizingMaskIntoConstraints="NO" id="yRE-5c-FhX"> <rect key="frame" x="67" y="251" width="214" height="14"/> @@ -87,6 +96,9 @@ <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> </textFieldCell> <accessibility description="Tracks summary"/> + <connections> + <binding destination="-2" name="textColor" keyPath="self.labelColor" id="yvf-9M-R6G"/> + </connections> </textField> <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" preferredMaxLayoutWidth="170" translatesAutoresizingMaskIntoConstraints="NO" id="BHq-Mt-3eA"> <rect key="frame" x="67" y="221" width="214" height="14"/> @@ -96,6 +108,9 @@ <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> </textFieldCell> <accessibility description="Filters summary"/> + <connections> + <binding destination="-2" name="textColor" keyPath="self.labelColor" id="lMO-Nm-o0r"/> + </connections> </textField> <customView wantsLayer="YES" translatesAutoresizingMaskIntoConstraints="NO" id="m5a-0z-QQ4"> <rect key="frame" x="295" y="16" width="556" height="334"/> @@ -108,6 +123,9 @@ <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> </textFieldCell> + <connections> + <binding destination="-2" name="textColor" keyPath="self.labelColor" id="EMw-0U-JBu"/> + </connections> </textField> <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" preferredMaxLayoutWidth="170" translatesAutoresizingMaskIntoConstraints="NO" id="Jaw-pH-rhf"> <rect key="frame" x="67" y="191" width="214" height="14"/> @@ -117,6 +135,9 @@ <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> </textFieldCell> <accessibility description="Size summary"/> + <connections> + <binding destination="-2" name="textColor" keyPath="self.labelColor" id="4UW-2D-uWZ"/> + </connections> </textField> <customView translatesAutoresizingMaskIntoConstraints="NO" id="9OK-03-grs"> <rect key="frame" x="69" y="281" width="114" height="48"/> 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 @@ <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> </textFieldCell> <accessibility description="Source file"/> + <connections> + <binding destination="-2" name="textColor" keyPath="self.labelColor" id="65m-tX-rfB"/> + </connections> </textField> <textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="100" translatesAutoresizingMaskIntoConstraints="NO" id="1540"> <rect key="frame" x="18" y="540" width="33" height="14"/> 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; |