Skip to content

Commit d11a041

Browse files
authored
Merge pull request #41 from dado3212/DarkMode
Fix dark mode 1.7.1
2 parents 42af49b + f48bc48 commit d11a041

File tree

8 files changed

+18
-12
lines changed

8 files changed

+18
-12
lines changed

SpacesRenamer/AppDelegate.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
197197

198198
nameChangeWindow.makeKeyAndOrderFront(nil)
199199
nameChangeWindow.selectCurrent()
200+
nameChangeWindow.backgroundColor = .windowBackgroundColor
200201
NSApp.activate(ignoringOtherApps: true)
201202
}
202203
}

SpacesRenamer/Base.lproj/Main.storyboard

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
2+
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
33
<dependencies>
44
<deployment identifier="macosx"/>
5-
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="13771"/>
5+
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14490.70"/>
66
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
77
</dependencies>
88
<scenes>
@@ -620,7 +620,7 @@
620620
<menuItem title="Show Sidebar" keyEquivalent="s" id="kIP-vf-haE">
621621
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
622622
<connections>
623-
<action selector="toggleSourceList:" target="Ady-hI-5gd" id="iwa-gc-5KM"/>
623+
<action selector="toggleSidebar:" target="Ady-hI-5gd" id="iwa-gc-5KM"/>
624624
</connections>
625625
</menuItem>
626626
<menuItem title="Enter Full Screen" keyEquivalent="f" id="4J7-dP-txa">
@@ -693,7 +693,7 @@
693693
<rect key="frame" x="39" y="10" width="254" height="42"/>
694694
<subviews>
695695
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="s0d-4E-whr">
696-
<rect key="frame" x="10" y="8" width="150" height="25"/>
696+
<rect key="frame" x="9.5" y="9" width="151" height="23"/>
697697
<constraints>
698698
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="150" id="Ngv-75-PXU"/>
699699
</constraints>

SpacesRenamer/DesktopSnippet.xib

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="13771" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
2+
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
33
<dependencies>
44
<deployment identifier="macosx"/>
5-
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="13771"/>
6-
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
5+
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14490.70"/>
76
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
87
</dependencies>
98
<objects>
@@ -37,7 +36,7 @@
3736
</constraints>
3837
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="WAL-RR-xNz">
3938
<font key="font" metaFont="system"/>
40-
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
39+
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
4140
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
4241
</textFieldCell>
4342
</textField>
@@ -65,6 +64,6 @@
6564
</customView>
6665
</objects>
6766
<resources>
68-
<image name="Monitor" width="318" height="208"/>
67+
<image name="Monitor" width="159" height="104"/>
6968
</resources>
7069
</document>

SpacesRenamer/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<key>CFBundlePackageType</key>
1818
<string>APPL</string>
1919
<key>CFBundleShortVersionString</key>
20-
<string>1.7.0</string>
20+
<string>1.7.1</string>
2121
<key>CFBundleVersion</key>
2222
<string>1</string>
2323
<key>LSMinimumSystemVersion</key>

SpacesRenamer/NameChangeWindow.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ class NameChangeWindow: NSWindow {
1515
self.title = "Spaces Renamer"
1616
self.isOpaque = false
1717
self.isMovable = false
18-
self.backgroundColor = NSColor(calibratedHue: 0, saturation: 0.0, brightness: 100, alpha: 0.95)
1918
// To make it auto-hide on F3
2019
self.collectionBehavior = [.transient, .ignoresCycle, .canJoinAllSpaces]
2120
self.level = .modalPanel

SpacesRenamer/ViewController.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ import Cocoa
1111
class ViewController: NSViewController {
1212
@IBOutlet var updateButton: NSButton!
1313

14+
private var appearanceChangeObservation: NSKeyValueObservation?
15+
1416
var desktops: [String: NSTextField] = [String: NSTextField]()
1517
var constraints: [NSLayoutConstraint] = []
1618
var viewsToRemove: [NSView] = []
@@ -22,6 +24,10 @@ class ViewController: NSViewController {
2224
override func viewDidLoad() {
2325
super.viewDidLoad()
2426

27+
appearanceChangeObservation = view.observe(\.effectiveAppearance) { [weak self] _, _ in
28+
self?.refreshViews()
29+
}
30+
2531
setupViews()
2632
}
2733

@@ -140,6 +146,7 @@ class ViewController: NSViewController {
140146
}
141147

142148
snippet.label.stringValue = "\(i)"
149+
snippet.label.textColor = .highlightColor
143150
snippet.textField.delegate = self
144151
if (monitorPairings[monitorPairings.count - 1][monitorScrollView]!.count > 0) {
145152
monitorPairings[monitorPairings.count - 1][monitorScrollView]!.last?.textField.nextKeyView = snippet.textField

build/spaces-renamer.zip

3.41 KB
Binary file not shown.

spaces-renamer/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<key>CFBundlePackageType</key>
1818
<string>BNDL</string>
1919
<key>CFBundleShortVersionString</key>
20-
<string>1.7.0</string>
20+
<string>1.7.1</string>
2121
<key>CFBundleSignature</key>
2222
<string>????</string>
2323
<key>CFBundleVersion</key>

0 commit comments

Comments
 (0)