Skip to content

Commit 3592009

Browse files
Brooklyn 2.0.1 (#31)
* Fixed Done button on High Sierra * Fixed Window not becoming key on High Sierra
1 parent 06e9d3d commit 3592009

File tree

3 files changed

+10
-20
lines changed

3 files changed

+10
-20
lines changed

Brooklyn/Contexts/Preferences/PreferencesWindowController.swift

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,14 @@ final class PreferencesWindowController: NSWindowController, NSWindowDelegate {
3131

3232
// MARK: - Lifecycle
3333
extension PreferencesWindowController {
34-
34+
3535
override func windowDidLoad() {
3636
super.windowDidLoad()
3737
configure()
3838
}
3939

4040
override func keyUp(with event: NSEvent) {
41-
super.keyUp(with: event)
42-
43-
if event.keyCode == Constant.spacebarKeyCode {
41+
if event.keyCode == Constant.spacebarKeyCode, !event.isARepeat {
4442
guard !animationsTableView.selectedRowIndexes.isEmpty else { return }
4543
animationsTableView.selectedRowIndexes.forEach {
4644
guard $0 >= 0 else { return }
@@ -136,6 +134,6 @@ private extension PreferencesWindowController {
136134
@IBAction func doneAction(_ sender: NSButton) {
137135
animationsTableView.deselectAll(nil)
138136
guard let window = window else { return }
139-
window.endSheet(window)
137+
window.sheetParent?.endSheet(window)
140138
}
141139
}

Brooklyn/Contexts/Preferences/PreferencesWindowController.xib

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@
2020
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
2121
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
2222
<window title="Preferences" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" restorable="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="QvC-M9-y7g">
23+
<windowStyleMask key="styleMask" titled="YES"/>
2324
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
2425
<rect key="contentRect" x="196" y="240" width="800" height="512"/>
25-
<rect key="screenRect" x="0.0" y="0.0" width="1680" height="1050"/>
26+
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1200"/>
2627
<view key="contentView" wantsLayer="YES" id="EiT-Mj-1SZ">
2728
<rect key="frame" x="0.0" y="0.0" width="800" height="512"/>
2829
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@@ -59,7 +60,7 @@
5960
<subviews>
6061
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="YlX-oQ-WQ2">
6162
<rect key="frame" x="365" y="-2" width="18" height="18"/>
62-
<buttonCell key="cell" type="check" bezelStyle="regularSquare" imagePosition="only" inset="2" id="lWN-QX-1EU">
63+
<buttonCell key="cell" type="check" bezelStyle="regularSquare" imagePosition="only" refusesFirstResponder="YES" inset="2" id="lWN-QX-1EU">
6364
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
6465
<font key="font" metaFont="system"/>
6566
</buttonCell>
@@ -163,8 +164,8 @@ DQ
163164
</connections>
164165
</button>
165166
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="U06-cj-0bE">
166-
<rect key="frame" x="432" y="186" width="93" height="17"/>
167-
<textFieldCell key="cell" lineBreakMode="clipping" title="Random Order" id="i0q-Ty-Q3X">
167+
<rect key="frame" x="432" y="186" width="263" height="17"/>
168+
<textFieldCell key="cell" lineBreakMode="clipping" title="Play Selected Animations in Random Order" id="i0q-Ty-Q3X">
168169
<font key="font" metaFont="system"/>
169170
<color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/>
170171
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
@@ -310,15 +311,6 @@ DQ
310311
</connections>
311312
<point key="canvasLocation" x="251" y="248"/>
312313
</window>
313-
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="piF-LM-Z4F">
314-
<rect key="frame" x="0.0" y="0.0" width="37" height="17"/>
315-
<autoresizingMask key="autoresizingMask"/>
316-
<textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="eWd-PK-ZV9">
317-
<font key="font" usesAppearanceFont="YES"/>
318-
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
319-
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
320-
</textFieldCell>
321-
</textField>
322314
</objects>
323315
<resources>
324316
<image name="github" width="686.4000244140625" height="409.60000610351562"/>

Brooklyn/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
<key>CFBundlePackageType</key>
1616
<string>BNDL</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>2.0.0</string>
18+
<string>2.0.1</string>
1919
<key>CFBundleVersion</key>
20-
<string>2</string>
20+
<string>3</string>
2121
<key>NSPrincipalClass</key>
2222
<string>Brooklyn.BrooklynView</string>
2323
</dict>

0 commit comments

Comments
 (0)