]> granicus.if.org Git - transmission/commitdiff
Update the info tab on appearance change
authorMitchell Livingston <livings124@mac.com>
Fri, 21 Dec 2018 22:37:17 +0000 (17:37 -0500)
committerMitchell Livingston <livings124@mac.com>
Fri, 21 Dec 2018 22:37:17 +0000 (17:37 -0500)
Transmission.xcodeproj/project.pbxproj
macosx/InfoTabButtonCell.h
macosx/InfoTabButtonCell.m
macosx/InfoTabMatrix.h [new file with mode: 0644]
macosx/InfoTabMatrix.m [new file with mode: 0644]
macosx/InfoWindow.xib

index 45acb4b884300052c0169dea2f8d48c38b719f7f..267d02e3acacf4ff0faa971b4fa9e984d089286a 100644 (file)
                A23547E211CD0B090046EAE6 /* cache.c in Sources */ = {isa = PBXBuildFile; fileRef = A23547E011CD0B090046EAE6 /* cache.c */; };
                A23547E311CD0B090046EAE6 /* cache.h in Headers */ = {isa = PBXBuildFile; fileRef = A23547E111CD0B090046EAE6 /* cache.h */; };
                A2385DD40BFE06C800B24EF6 /* DragOverlayWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = A2385DD20BFE06C800B24EF6 /* DragOverlayWindow.m */; };
+               A238D49F21CDA1A5006B03EA /* InfoTabMatrix.m in Sources */ = {isa = PBXBuildFile; fileRef = A238D49E21CDA1A5006B03EA /* InfoTabMatrix.m */; };
                A23F29A1132A447400E9A83B /* announcer-common.h in Headers */ = {isa = PBXBuildFile; fileRef = A23F299F132A447400E9A83B /* announcer-common.h */; };
                A23F29A2132A447400E9A83B /* announcer-http.c in Sources */ = {isa = PBXBuildFile; fileRef = A23F29A0132A447400E9A83B /* announcer-http.c */; };
                A23F4FF20D1D98AD002FCB97 /* PrefsWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = A23F4FF00D1D98AD002FCB97 /* PrefsWindow.xib */; };
                A236D19615F6BD9C000C3DD4 /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = macosx/QuickLookPlugin/it.lproj/Localizable.strings; sourceTree = SOURCE_ROOT; };
                A2385DD20BFE06C800B24EF6 /* DragOverlayWindow.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = DragOverlayWindow.m; path = macosx/DragOverlayWindow.m; sourceTree = "<group>"; };
                A2385DD30BFE06C800B24EF6 /* DragOverlayWindow.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = DragOverlayWindow.h; path = macosx/DragOverlayWindow.h; sourceTree = "<group>"; };
+               A238D49D21CDA1A5006B03EA /* InfoTabMatrix.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = InfoTabMatrix.h; path = macosx/InfoTabMatrix.h; sourceTree = "<group>"; };
+               A238D49E21CDA1A5006B03EA /* InfoTabMatrix.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = InfoTabMatrix.m; path = macosx/InfoTabMatrix.m; sourceTree = "<group>"; };
                A23F299F132A447400E9A83B /* announcer-common.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "announcer-common.h"; path = "libtransmission/announcer-common.h"; sourceTree = "<group>"; };
                A23F29A0132A447400E9A83B /* announcer-http.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = "announcer-http.c"; path = "libtransmission/announcer-http.c"; sourceTree = "<group>"; };
                A23F526D0F14395900AA02E3 /* PredicateEditorRowTemplateAny.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = PredicateEditorRowTemplateAny.h; path = macosx/PredicateEditorRowTemplateAny.h; sourceTree = "<group>"; };
                                A257C1800CAD3003004E121C /* PeerTableView.m */,
                                A2E23AC30CB5E1930002BB25 /* InfoTabButtonCell.h */,
                                A2E23AC40CB5E1930002BB25 /* InfoTabButtonCell.m */,
+                               A238D49D21CDA1A5006B03EA /* InfoTabMatrix.h */,
+                               A238D49E21CDA1A5006B03EA /* InfoTabMatrix.m */,
                                A25BB02812F4F517004B724E /* InfoTabButtonBack.h */,
                                A25BB02912F4F517004B724E /* InfoTabButtonBack.m */,
                                A200B8390A2263BA007BBB1E /* InfoWindowController.h */,
                                A2B5B4E91880665E0071A66A /* ShareTorrentFileHelper.m in Sources */,
                                A22BAE281388040500FB022F /* NSMutableArrayAdditions.m in Sources */,
                                A2966E8713DAF74C007B52DF /* GlobalOptionsPopoverViewController.m in Sources */,
+                               A238D49F21CDA1A5006B03EA /* InfoTabMatrix.m in Sources */,
                                A234EA541453563B000F3E97 /* NSImageAdditions.m in Sources */,
                                A2AB883E16A399A6008FAD50 /* VDKQueue.m in Sources */,
                                A2451E6916ACE4EB00586E0E /* FileRenameSheetController.m in Sources */,
index 46bce293583a5e62ac7dc6fbb08f393460174858..fed93ef9b421c8ea50d699059735e1750588c0c2 100644 (file)
@@ -31,4 +31,6 @@
 
 - (void) setSelectedTab: (BOOL) selected;
 
+- (void) reloadAppearance;
+
 @end
index 15099cfdb2df2f570fcc7ac48d56d2de8a9a67a4..b15a5c884004dddbf5cf5f0691beca40d83190ca 100644 (file)
 - (void) setSelectedTab: (BOOL) selected
 {
     fSelected = selected;
+    
+    [self reloadAppearance];
+}
 
+- (void) reloadAppearance
+{
     if ([self controlView] == nil)
         return;
 
diff --git a/macosx/InfoTabMatrix.h b/macosx/InfoTabMatrix.h
new file mode 100644 (file)
index 0000000..5c01357
--- /dev/null
@@ -0,0 +1,17 @@
+//
+//  InfoTabMatrix.h
+//  Transmission
+//
+//  Created by Mitchell Livingston on 12/21/18.
+//  Copyright © 2018 The Transmission Project. All rights reserved.
+//
+
+#import <Cocoa/Cocoa.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface InfoTabMatrix : NSMatrix
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/macosx/InfoTabMatrix.m b/macosx/InfoTabMatrix.m
new file mode 100644 (file)
index 0000000..a9c4bd8
--- /dev/null
@@ -0,0 +1,21 @@
+//
+//  InfoTabMatrix.m
+//  Transmission
+//
+//  Created by Mitchell Livingston on 12/21/18.
+//  Copyright © 2018 The Transmission Project. All rights reserved.
+//
+
+#import "InfoTabMatrix.h"
+#import "InfoTabButtonCell.h"
+
+@implementation InfoTabMatrix
+
+- (void)viewDidChangeEffectiveAppearance;
+{
+    for (InfoTabButtonCell *cell in self.cells) {
+        [cell reloadAppearance];
+    }
+}
+
+@end
index 594bfe07d3e34cf8f0271dfa7a1ffe391096d17e..25ef94b0519b44ebc353b4d500a0b773d25f10fb 100644 (file)
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="11762" systemVersion="16D32" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
     <dependencies>
         <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11762"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14460.31"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
         </customObject>
         <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
         <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <window title="Torrent Inspector" allowsToolTipsWhenApplicationIsInactive="NO" restorable="NO" hidesOnDeactivate="YES" oneShot="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" tabbingMode="disallowed" id="5" userLabel="InfoWindow" customClass="NSPanel">
+        <window title="Torrent Inspector" allowsToolTipsWhenApplicationIsInactive="NO" restorable="NO" hidesOnDeactivate="YES" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" tabbingMode="disallowed" id="5" userLabel="InfoWindow" customClass="NSPanel">
             <windowStyleMask key="styleMask" titled="YES" closable="YES" resizable="YES" utility="YES"/>
             <rect key="contentRect" x="897" y="867" width="403" height="77"/>
-            <rect key="screenRect" x="0.0" y="0.0" width="1440" height="877"/>
+            <rect key="screenRect" x="0.0" y="0.0" width="2560" height="1417"/>
             <value key="minSize" type="size" width="350" height="77"/>
             <view key="contentView" id="6">
                 <rect key="frame" x="0.0" y="0.0" width="403" height="77"/>
                 <autoresizingMask key="autoresizingMask"/>
                 <subviews>
-                    <textField horizontalHuggingPriority="249" verticalHuggingPriority="750" horizontalCompressionResistancePriority="249" translatesAutoresizingMaskIntoConstraints="NO" id="15" customClass="InfoTextField">
+                    <textField horizontalHuggingPriority="249" verticalHuggingPriority="750" horizontalCompressionResistancePriority="249" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="15" customClass="InfoTextField">
                         <rect key="frame" x="48" y="50" width="347" height="17"/>
                         <textFieldCell key="cell" lineBreakMode="truncatingMiddle" sendsActionOnEndEditing="YES" alignment="left" title="title" id="1481">
                             <font key="font" metaFont="systemBold"/>
@@ -35,7 +35,7 @@
                             <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
                         </textFieldCell>
                     </textField>
-                    <textField horizontalHuggingPriority="249" verticalHuggingPriority="750" horizontalCompressionResistancePriority="249" translatesAutoresizingMaskIntoConstraints="NO" id="1832">
+                    <textField horizontalHuggingPriority="249" verticalHuggingPriority="750" horizontalCompressionResistancePriority="249" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="1832">
                         <rect key="frame" x="48" y="43" width="347" height="17"/>
                         <textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" alignment="left" title="No Torrents Selected" id="1833">
                             <font key="font" metaFont="systemBold"/>
@@ -51,7 +51,7 @@
                         </constraints>
                         <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="NSApplicationIcon" id="1482"/>
                     </imageView>
-                    <textField horizontalHuggingPriority="249" verticalHuggingPriority="750" horizontalCompressionResistancePriority="249" translatesAutoresizingMaskIntoConstraints="NO" id="29" customClass="InfoTextField">
+                    <textField horizontalHuggingPriority="249" verticalHuggingPriority="750" horizontalCompressionResistancePriority="249" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="29" customClass="InfoTextField">
                         <rect key="frame" x="48" y="36" width="347" height="14"/>
                         <textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="info" id="1483">
                             <font key="font" metaFont="smallSystem"/>
@@ -59,7 +59,7 @@
                             <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
                         </textFieldCell>
                     </textField>
-                    <matrix horizontalHuggingPriority="750" verticalHuggingPriority="750" allowsEmptySelection="NO" autosizesCells="NO" translatesAutoresizingMaskIntoConstraints="NO" id="927">
+                    <matrix horizontalHuggingPriority="750" verticalHuggingPriority="750" allowsEmptySelection="NO" autosizesCells="NO" translatesAutoresizingMaskIntoConstraints="NO" id="927" customClass="InfoTabMatrix">
                         <rect key="frame" x="0.0" y="0.0" width="330" height="25"/>
                         <constraints>
                             <constraint firstAttribute="height" constant="25" id="hKz-ct-bbc"/>
         <image name="InfoOptions" width="20" height="20"/>
         <image name="InfoPeers" width="20" height="20"/>
         <image name="InfoTracker" width="20" height="20"/>
-        <image name="NSApplicationIcon" width="128" height="128"/>
+        <image name="NSApplicationIcon" width="32" height="32"/>
     </resources>
 </document>