Skip to content

Commit 3ab22cc

Browse files
committed
Fixed minor UI quirks
1 parent 1c3627b commit 3ab22cc

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

SwiftyJSONAccelerator/Storyboard/Base.lproj/Main.storyboard

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -751,16 +751,19 @@
751751
</box>
752752
<popUpButton verticalHuggingPriority="750" springLoaded="YES" translatesAutoresizingMaskIntoConstraints="NO" id="r5l-Lv-rfg">
753753
<rect key="frame" x="10" y="35" width="348" height="26"/>
754-
<popUpButtonCell key="cell" type="push" title="SwiftyJSON" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" pullsDown="YES" arrowPosition="arrowAtCenter" selectedItem="0QP-u9-O6V" id="l4o-yX-zdG">
754+
<popUpButtonCell key="cell" type="push" title="SwiftyJSON" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" pullsDown="YES" arrowPosition="arrowAtCenter" autoenablesItems="NO" altersStateOfSelectedItem="NO" selectedItem="0QP-u9-O6V" id="l4o-yX-zdG">
755755
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
756756
<font key="font" metaFont="system"/>
757-
<menu key="menu" id="QJi-PT-im1">
757+
<menu key="menu" autoenablesItems="NO" id="QJi-PT-im1">
758758
<items>
759759
<menuItem title="SwiftyJSON" state="on" hidden="YES" id="0QP-u9-O6V"/>
760760
<menuItem title="ObjectMapper" id="FPc-o9-hXy"/>
761761
</items>
762762
</menu>
763763
</popUpButtonCell>
764+
<connections>
765+
<action selector="librarySwitchedWithSender:" target="XfG-lQ-9wD" id="bwM-P9-BEg"/>
766+
</connections>
764767
</popUpButton>
765768
<segmentedControl focusRingType="exterior" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ZUC-Iy-7fC">
766769
<rect key="frame" x="363" y="35" width="342" height="25"/>

SwiftyJSONAccelerator/UI/SJEditorViewController.swift

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ class SJEditorViewController: NSViewController, NSTextViewDelegate {
166166
}
167167
NSUserNotificationCenter.default.deliver(notification)
168168
}
169-
169+
170170
// MARK: Internal Methods
171171

172172
/**
@@ -275,6 +275,13 @@ class SJEditorViewController: NSViewController, NSTextViewDelegate {
275275
}
276276
}
277277

278+
@IBAction func librarySwitched(sender: Any) {
279+
if let menu = sender as? NSPopUpButton {
280+
self.librarySelector.title = menu.selectedItem!.title
281+
}
282+
}
283+
284+
278285
// MARK: Internal Methods
279286

280287
/**

SwiftyJSONAcceleratorTests/Support Files/TestJSONFile.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@
1919
}
2020
}
2121
}
22-
}dd
22+
}

0 commit comments

Comments
 (0)