mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-01-09 00:13:45 +01:00
Move filter buttons to the top right and the settings button to bottom left. Issue #1554
This commit is contained in:
parent
92cfbc767b
commit
b5d1858fef
@ -65,12 +65,12 @@
|
||||
</connections>
|
||||
</tableView>
|
||||
<toolbarItems>
|
||||
<barButtonItem image="line.horizontal.3.decrease.circle" catalog="system" id="Khk-Hd-iNS"/>
|
||||
<barButtonItem title="Item" image="gear" catalog="system" id="AK3-N5-4ke"/>
|
||||
<barButtonItem style="plain" systemItem="flexibleSpace" id="Kjl-Sb-QP1"/>
|
||||
<barButtonItem systemItem="add" id="PVr-3K-nPg"/>
|
||||
</toolbarItems>
|
||||
<navigationItem key="navigationItem" title="Feeds" largeTitleDisplayMode="never" id="lE1-xw-gjH">
|
||||
<barButtonItem key="leftBarButtonItem" title="Item" image="gear" catalog="system" id="AK3-N5-4ke"/>
|
||||
<barButtonItem key="rightBarButtonItem" image="line.horizontal.3.decrease.circle" catalog="system" id="Khk-Hd-iNS"/>
|
||||
</navigationItem>
|
||||
<simulatedToolbarMetrics key="simulatedBottomBarMetrics"/>
|
||||
</tableViewController>
|
||||
|
@ -65,12 +65,12 @@
|
||||
</connections>
|
||||
</tableView>
|
||||
<toolbarItems>
|
||||
<barButtonItem image="line.horizontal.3.decrease.circle" catalog="system" id="Khk-Hd-iNS"/>
|
||||
<barButtonItem title="Item" image="gear" catalog="system" id="AK3-N5-4ke"/>
|
||||
<barButtonItem style="plain" systemItem="flexibleSpace" id="Kjl-Sb-QP1"/>
|
||||
<barButtonItem systemItem="add" id="PVr-3K-nPg"/>
|
||||
</toolbarItems>
|
||||
<navigationItem key="navigationItem" title="Feeds" largeTitleDisplayMode="always" id="lE1-xw-gjH">
|
||||
<barButtonItem key="leftBarButtonItem" title="Item" image="gear" catalog="system" id="AK3-N5-4ke"/>
|
||||
<barButtonItem key="rightBarButtonItem" image="line.horizontal.3.decrease.circle" catalog="system" id="Khk-Hd-iNS"/>
|
||||
</navigationItem>
|
||||
<simulatedToolbarMetrics key="simulatedBottomBarMetrics"/>
|
||||
</tableViewController>
|
||||
|
@ -119,12 +119,12 @@
|
||||
</connections>
|
||||
</tableView>
|
||||
<toolbarItems>
|
||||
<barButtonItem image="line.horizontal.3.decrease.circle" catalog="system" id="af2-lj-EcA">
|
||||
<barButtonItem title="Item" image="markAllAsRead" id="fTv-eX-72r">
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="accLabelText" value="FIlter Articles"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="accLabelText" value="Mark All as Read"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="toggleFilter:" destination="Kyk-vK-QRX" id="jxP-b2-V1n"/>
|
||||
<action selector="markAllAsRead:" destination="Kyk-vK-QRX" id="4nd-Gg-APm"/>
|
||||
</connections>
|
||||
</barButtonItem>
|
||||
<barButtonItem style="plain" systemItem="flexibleSpace" id="53V-wq-bat"/>
|
||||
@ -139,12 +139,12 @@
|
||||
</barButtonItem>
|
||||
</toolbarItems>
|
||||
<navigationItem key="navigationItem" title="Timeline" largeTitleDisplayMode="never" id="wcC-1L-ug4">
|
||||
<barButtonItem key="rightBarButtonItem" title="Item" image="markAllAsRead" id="fTv-eX-72r">
|
||||
<barButtonItem key="rightBarButtonItem" image="line.horizontal.3.decrease.circle" catalog="system" id="af2-lj-EcA">
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="accLabelText" value="Mark All as Read"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="accLabelText" value="FIlter Articles"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="markAllAsRead:" destination="Kyk-vK-QRX" id="4nd-Gg-APm"/>
|
||||
<action selector="toggleFilter:" destination="Kyk-vK-QRX" id="jxP-b2-V1n"/>
|
||||
</connections>
|
||||
</barButtonItem>
|
||||
</navigationItem>
|
||||
@ -163,6 +163,7 @@
|
||||
<!--Feeds-->
|
||||
<scene sceneID="smW-Zh-WAh">
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="Rux-fX-hf1" sceneMemberID="firstResponder"/>
|
||||
<tableViewController storyboardIdentifier="MasterFeedViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" clearsSelectionOnViewWillAppear="NO" id="7bK-jq-Zjz" customClass="MasterFeedViewController" customModule="NetNewsWire" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" id="r7i-6Z-zg0">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
||||
@ -185,9 +186,8 @@
|
||||
<outlet property="delegate" destination="7bK-jq-Zjz" id="RA6-mI-bju"/>
|
||||
</connections>
|
||||
</tableView>
|
||||
<toolbarItems/>
|
||||
<navigationItem key="navigationItem" title="Feeds" id="Zdf-7t-Un8">
|
||||
<barButtonItem key="leftBarButtonItem" title="Settings" image="gear" catalog="system" id="TlU-Pg-ATe">
|
||||
<toolbarItems>
|
||||
<barButtonItem title="Settings" image="gear" catalog="system" id="TlU-Pg-ATe">
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="accLabelText" value="Settings"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
@ -195,11 +195,34 @@
|
||||
<action selector="settings:" destination="7bK-jq-Zjz" id="Y8a-lz-Im7"/>
|
||||
</connections>
|
||||
</barButtonItem>
|
||||
<barButtonItem style="plain" systemItem="flexibleSpace" id="Rbh-Vg-Wo8"/>
|
||||
<barButtonItem style="plain" systemItem="flexibleSpace" id="Vhj-bc-20A"/>
|
||||
<barButtonItem systemItem="add" id="YFE-wd-vFC">
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="accLabelText" value="Add Item"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="add:" destination="7bK-jq-Zjz" id="d1n-0d-2gR"/>
|
||||
</connections>
|
||||
</barButtonItem>
|
||||
</toolbarItems>
|
||||
<navigationItem key="navigationItem" title="Feeds" id="Zdf-7t-Un8">
|
||||
<barButtonItem key="rightBarButtonItem" image="line.horizontal.3.decrease.circle" catalog="system" id="9ro-XY-5xU">
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="accLabelText" value="Feeds Filter"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="toggleFilter:" destination="7bK-jq-Zjz" id="jmL-ei-avl"/>
|
||||
</connections>
|
||||
</barButtonItem>
|
||||
</navigationItem>
|
||||
<simulatedNavigationBarMetrics key="simulatedTopBarMetrics" prompted="NO"/>
|
||||
<simulatedToolbarMetrics key="simulatedBottomBarMetrics"/>
|
||||
<connections>
|
||||
<outlet property="addNewItemButton" destination="YFE-wd-vFC" id="NMJ-uE-zGh"/>
|
||||
<outlet property="filterButton" destination="9ro-XY-5xU" id="PSL-lE-ITK"/>
|
||||
</connections>
|
||||
</tableViewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="Rux-fX-hf1" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="900" y="-759"/>
|
||||
</scene>
|
||||
|
@ -14,9 +14,9 @@ import RSTree
|
||||
|
||||
class MasterFeedViewController: UITableViewController, UndoableCommandRunner {
|
||||
|
||||
private var filterButton: UIBarButtonItem!
|
||||
@IBOutlet weak var filterButton: UIBarButtonItem!
|
||||
private var refreshProgressView: RefreshProgressView?
|
||||
private var addNewItemButton: UIBarButtonItem!
|
||||
@IBOutlet weak var addNewItemButton: UIBarButtonItem!
|
||||
|
||||
lazy var dataSource = makeDataSource()
|
||||
var undoableCommands = [UndoableCommand]()
|
||||
@ -400,7 +400,7 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner {
|
||||
coordinator.showSettings()
|
||||
}
|
||||
|
||||
@objc func toggleFilter(_ sender: Any) {
|
||||
@IBAction func toggleFilter(_ sender: Any) {
|
||||
if coordinator.isReadFeedsFiltered {
|
||||
filterButton.image = AppAssets.filterInactiveImage
|
||||
coordinator.showAllFeeds()
|
||||
@ -410,7 +410,7 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner {
|
||||
}
|
||||
}
|
||||
|
||||
@objc func add(_ sender: UIBarButtonItem) {
|
||||
@IBAction func add(_ sender: UIBarButtonItem) {
|
||||
coordinator.showAdd(.feed)
|
||||
}
|
||||
|
||||
@ -668,20 +668,8 @@ private extension MasterFeedViewController {
|
||||
}
|
||||
|
||||
self.refreshProgressView = refreshProgressView
|
||||
|
||||
filterButton = UIBarButtonItem(image: AppAssets.filterInactiveImage, style: .plain, target: self, action: #selector(toggleFilter(_:)))
|
||||
filterButton.accLabelText = NSLocalizedString("Filter Feeds", comment: "Filter Feeds")
|
||||
let spaceItemButton1 = UIBarButtonItem(barButtonSystemItem: .flexibleSpace, target: nil, action: nil)
|
||||
let refreshProgressItemButton = UIBarButtonItem(customView: refreshProgressView)
|
||||
let spaceItemButton2 = UIBarButtonItem(barButtonSystemItem: .flexibleSpace, target: nil, action: nil)
|
||||
addNewItemButton = UIBarButtonItem(barButtonSystemItem: .add, target: self, action: #selector(add(_:)))
|
||||
|
||||
setToolbarItems([filterButton,
|
||||
spaceItemButton1,
|
||||
refreshProgressItemButton,
|
||||
spaceItemButton2,
|
||||
addNewItemButton
|
||||
], animated: false)
|
||||
toolbarItems?.insert(refreshProgressItemButton, at: 2)
|
||||
}
|
||||
|
||||
func updateUI() {
|
||||
|
Loading…
Reference in New Issue
Block a user