Remove sidebar filter button. Issue #2346

This commit is contained in:
Maurice Parker 2020-08-17 17:50:50 -05:00
parent 9c0730f4d3
commit 72bd722def
2 changed files with 4 additions and 40 deletions

View File

@ -290,35 +290,14 @@
<rect key="frame" x="0.0" y="0.0" width="166" height="307"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<visualEffectView blendingMode="behindWindow" material="appearanceBased" state="followsWindowActiveState" translatesAutoresizingMaskIntoConstraints="NO" id="977-L4-4ey">
<rect key="frame" x="0.0" y="284" width="166" height="23"/>
<subviews>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="eZS-8K-qiN">
<rect key="frame" x="141" y="5" width="13" height="13"/>
<buttonCell key="cell" type="bevel" bezelStyle="rounded" image="filterInactive" imagePosition="overlaps" alignment="center" imageScaling="proportionallyDown" inset="2" id="5QJ-Ja-Gng">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<color key="contentTintColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/>
<connections>
<action selector="toggleReadFeedsFilter:" target="Jih-JO-hIE" id="hbr-xR-smq"/>
</connections>
</button>
</subviews>
<constraints>
<constraint firstAttribute="height" constant="23" id="Ax2-oO-NTV"/>
<constraint firstAttribute="trailing" secondItem="eZS-8K-qiN" secondAttribute="trailing" constant="12" id="CFy-rz-Otf"/>
<constraint firstItem="eZS-8K-qiN" firstAttribute="top" secondItem="977-L4-4ey" secondAttribute="top" constant="5" id="M0q-C7-z10"/>
</constraints>
</visualEffectView>
<scrollView borderType="none" autohidesScrollers="YES" horizontalLineScroll="26" horizontalPageScroll="10" verticalLineScroll="26" verticalPageScroll="10" hasHorizontalScroller="NO" horizontalScrollElasticity="none" translatesAutoresizingMaskIntoConstraints="NO" id="cJj-Wv-9ep">
<rect key="frame" x="0.0" y="0.0" width="166" height="284"/>
<rect key="frame" x="0.0" y="0.0" width="166" height="307"/>
<clipView key="contentView" drawsBackground="NO" copiesOnScroll="NO" id="2eU-Wz-F9g">
<rect key="frame" x="0.0" y="0.0" width="166" height="284"/>
<rect key="frame" x="0.0" y="0.0" width="166" height="307"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<outlineView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="firstColumnOnly" selectionHighlightStyle="sourceList" columnReordering="NO" columnResizing="NO" autosaveColumns="NO" typeSelect="NO" rowHeight="26" viewBased="YES" floatsGroupRows="NO" indentationPerLevel="23" outlineTableColumn="ih9-mJ-EA7" id="cnV-kg-Dn2" customClass="SidebarOutlineView" customModule="NetNewsWire" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="166" height="284"/>
<rect key="frame" x="0.0" y="0.0" width="166" height="307"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<size key="intercellSpacing" width="3" height="0.0"/>
<color key="backgroundColor" name="_sourceListBackgroundColor" catalog="System" colorSpace="catalog"/>
@ -423,22 +402,18 @@
</customView>
</subviews>
<constraints>
<constraint firstItem="977-L4-4ey" firstAttribute="leading" secondItem="bJZ-bH-vgc" secondAttribute="leading" id="0MW-YQ-dI5"/>
<constraint firstItem="HZs-Zf-G8s" firstAttribute="top" secondItem="cJj-Wv-9ep" secondAttribute="bottom" id="0Zg-oW-o7U"/>
<constraint firstItem="cJj-Wv-9ep" firstAttribute="leading" secondItem="bJZ-bH-vgc" secondAttribute="leading" id="5Rs-9M-TKq"/>
<constraint firstItem="cJj-Wv-9ep" firstAttribute="top" secondItem="977-L4-4ey" secondAttribute="bottom" id="FPj-rG-6Lw"/>
<constraint firstItem="cJj-Wv-9ep" firstAttribute="top" secondItem="bJZ-bH-vgc" secondAttribute="top" id="A7C-VI-drt"/>
<constraint firstAttribute="trailing" secondItem="iyL-pW-cT6" secondAttribute="trailing" constant="20" id="Mnm-9S-Qpm"/>
<constraint firstAttribute="bottom" secondItem="HZs-Zf-G8s" secondAttribute="bottom" constant="-28" id="UN9-Wa-uxb"/>
<constraint firstItem="977-L4-4ey" firstAttribute="top" secondItem="bJZ-bH-vgc" secondAttribute="top" id="eBr-dj-I25"/>
<constraint firstAttribute="trailing" secondItem="HZs-Zf-G8s" secondAttribute="trailing" id="iNE-nb-QEB"/>
<constraint firstItem="HZs-Zf-G8s" firstAttribute="leading" secondItem="bJZ-bH-vgc" secondAttribute="leading" id="tPp-xB-CgB"/>
<constraint firstAttribute="trailing" secondItem="977-L4-4ey" secondAttribute="trailing" id="u5c-mj-zWD"/>
<constraint firstAttribute="trailing" secondItem="cJj-Wv-9ep" secondAttribute="trailing" id="vo7-3F-Fd3"/>
</constraints>
</view>
<connections>
<outlet property="outlineView" destination="cnV-kg-Dn2" id="FVf-OT-E3h"/>
<outlet property="readFilteredButton" destination="eZS-8K-qiN" id="DDa-Hl-TSh"/>
</connections>
</viewController>
<customObject id="Jih-JO-hIE" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>

View File

@ -20,7 +20,6 @@ protocol SidebarDelegate: class {
@objc class SidebarViewController: NSViewController, NSOutlineViewDelegate, NSMenuDelegate, UndoableCommandRunner {
@IBOutlet weak var readFilteredButton: NSButton!
@IBOutlet var outlineView: SidebarOutlineView!
weak var delegate: SidebarDelegate?
@ -129,8 +128,6 @@ protocol SidebarDelegate: class {
if let readFeedsFilterState = state[UserInfoKey.readFeedsFilterState] as? Bool {
isReadFiltered = readFeedsFilterState
}
updateReadFilterButton()
}
// MARK: - Notifications
@ -453,7 +450,6 @@ protocol SidebarDelegate: class {
}
delegate?.sidebarInvalidatedRestorationState(self)
rebuildTreeAndRestoreSelection()
updateReadFilterButton()
}
}
@ -820,13 +816,6 @@ private extension SidebarViewController {
return outlineView.revealAndSelectRepresentedObject(representedObject, treeController)
}
func updateReadFilterButton() {
if isReadFiltered {
readFilteredButton.image = AppAssets.filterActive
} else {
readFilteredButton.image = AppAssets.filterInactive
}
}
}
private extension Node {