]> granicus.if.org Git - handbrake/commitdiff
MacGUI: Disable all labels when no source loaded.
authorBradley Sepos <bradley@bradleysepos.com>
Fri, 26 Jan 2018 01:41:42 +0000 (20:41 -0500)
committerBradley Sepos <bradley@bradleysepos.com>
Fri, 26 Jan 2018 02:34:23 +0000 (21:34 -0500)
macosx/English.lproj/HBSummaryViewController.xib
macosx/English.lproj/MainWindow.xib
macosx/HBFiltersViewController.m
macosx/HBSummaryViewController.m

index d91afc97e7179fe73ad458e401213d9cd7074721..f1922f3a0821d90a8c23b16e6a075db82b68ff3b 100644 (file)
@@ -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"/>
                         <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"/>
                         <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"/>
                         <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"/>
index 418333c229a37e6a6cc4f3c360f643eabbe0bd79..95680f961cbc7b7c4c5d76c55589679159536269 100644 (file)
                             <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"/>
index ac7d75bc1423c8f3f6e48fcc00e73e62ebc39511..77139d6ec1c738543e9c7cc40de89b5cfd555898 100644 (file)
 - (instancetype)init
 {
     self = [super initWithNibName:@"HBFiltersViewController" bundle:nil];
+    if (self)
+    {
+        _labelColor = [NSColor disabledControlTextColor];
+    }
     return self;
 }
 
index 5b9beef756ced878827938fb123ec361d205d9d9..053660d68e8b19b22f9dd9e89a3d51f5b2bea50a 100644 (file)
@@ -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;