Switch back to using a source list sidebar. We’ll see how it goes once we add favicons.

This commit is contained in:
Brent Simmons 2017-11-19 20:42:37 -08:00
parent 5c2ef9641e
commit f885c918d2
2 changed files with 14 additions and 9 deletions

View File

@ -379,17 +379,17 @@
<rect key="frame" x="0.0" y="0.0" width="166" height="300"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<scrollView appearanceType="aqua" borderType="none" autohidesScrollers="YES" horizontalLineScroll="25" horizontalPageScroll="10" verticalLineScroll="25" verticalPageScroll="10" hasHorizontalScroller="NO" horizontalScrollElasticity="none" translatesAutoresizingMaskIntoConstraints="NO" id="cJj-Wv-9ep">
<scrollView appearanceType="aqua" borderType="none" autohidesScrollers="YES" horizontalLineScroll="22" horizontalPageScroll="10" verticalLineScroll="22" verticalPageScroll="10" hasHorizontalScroller="NO" horizontalScrollElasticity="none" translatesAutoresizingMaskIntoConstraints="NO" id="cJj-Wv-9ep">
<rect key="frame" x="0.0" y="0.0" width="166" height="300"/>
<clipView key="contentView" id="2eU-Wz-F9g">
<clipView key="contentView" drawsBackground="NO" id="2eU-Wz-F9g">
<rect key="frame" x="0.0" y="0.0" width="166" height="300"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<outlineView appearanceType="aqua" verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="firstColumnOnly" columnReordering="NO" columnResizing="NO" autosaveColumns="NO" rowHeight="22" rowSizeStyle="small" viewBased="YES" indentationPerLevel="16" autoresizesOutlineColumn="YES" outlineTableColumn="ih9-mJ-EA7" id="cnV-kg-Dn2" customClass="SidebarOutlineView" customModule="Evergreen" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="166" height="300"/>
<outlineView appearanceType="aqua" verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="firstColumnOnly" selectionHighlightStyle="sourceList" columnReordering="NO" columnResizing="NO" autosaveColumns="NO" rowHeight="22" rowSizeStyle="small" viewBased="YES" indentationPerLevel="14" outlineTableColumn="ih9-mJ-EA7" id="cnV-kg-Dn2" customClass="SidebarOutlineView" customModule="Evergreen" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="167" height="300"/>
<autoresizingMask key="autoresizingMask"/>
<size key="intercellSpacing" width="2" height="3"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<size key="intercellSpacing" width="3" height="0.0"/>
<color key="backgroundColor" name="_sourceListBackgroundColor" catalog="System" colorSpace="catalog"/>
<color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
<tableColumns>
<tableColumn identifier="" width="164" minWidth="16" maxWidth="1000" id="ih9-mJ-EA7">
@ -406,7 +406,7 @@
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES"/>
<prototypeCellViews>
<tableCellView identifier="HeaderCell" id="qkt-WA-5tB">
<rect key="frame" x="1" y="1" width="164" height="17"/>
<rect key="frame" x="1" y="0.0" width="164" height="17"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="fNJ-z1-0Up">
@ -424,7 +424,7 @@
</connections>
</tableCellView>
<tableCellView identifier="DataCell" id="HJn-Tm-YNO" customClass="SidebarCell" customModule="Evergreen" customModuleProvider="target">
<rect key="frame" x="1" y="21" width="164" height="17"/>
<rect key="frame" x="1" y="17" width="164" height="17"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ocU-b4-EaY">

View File

@ -60,10 +60,15 @@ class SidebarOutlineView : NSOutlineView {
override func frameOfCell(atColumn column: Int, row: Int) -> NSRect {
// Dont allow the pseudo-feeds at the top level to be indented.
var frame = super.frameOfCell(atColumn: column, row: row)
let node = item(atRow: row) as! Node
if node.isGroupItem {
guard let parentNode = node.parent, parentNode.isRoot else {
return frame
}
guard node.representedObject is PseudoFeed else {
return frame
}