Add TimelineHeaderView.
This commit is contained in:
parent
229a376a86
commit
6c135c80b0
|
@ -7,6 +7,7 @@
|
|||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
8414AD251FCF5A1E00955102 /* TimelineHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8414AD241FCF5A1E00955102 /* TimelineHeaderView.swift */; };
|
||||
8426118A1FCB67AA0086A189 /* FeedIconDownloader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 842611891FCB67AA0086A189 /* FeedIconDownloader.swift */; };
|
||||
8426119E1FCB6ED40086A189 /* HTMLMetadataDownloader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8426119D1FCB6ED40086A189 /* HTMLMetadataDownloader.swift */; };
|
||||
842611A01FCB72600086A189 /* FeaturedImageDownloader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8426119F1FCB72600086A189 /* FeaturedImageDownloader.swift */; };
|
||||
|
@ -407,6 +408,7 @@
|
|||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
8414AD241FCF5A1E00955102 /* TimelineHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineHeaderView.swift; sourceTree = "<group>"; };
|
||||
842611891FCB67AA0086A189 /* FeedIconDownloader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FeedIconDownloader.swift; sourceTree = "<group>"; };
|
||||
8426119D1FCB6ED40086A189 /* HTMLMetadataDownloader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HTMLMetadataDownloader.swift; sourceTree = "<group>"; };
|
||||
8426119F1FCB72600086A189 /* FeaturedImageDownloader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FeaturedImageDownloader.swift; sourceTree = "<group>"; };
|
||||
|
@ -693,6 +695,7 @@
|
|||
849A97691ED9EBC8007D329B /* TimelineTableRowView.swift */,
|
||||
849A976A1ED9EBC8007D329B /* TimelineTableView.swift */,
|
||||
84E95D231FB1087500552D99 /* ArticlePasteboardWriter.swift */,
|
||||
8414AD241FCF5A1E00955102 /* TimelineHeaderView.swift */,
|
||||
849A976F1ED9EC04007D329B /* Cell */,
|
||||
);
|
||||
path = Timeline;
|
||||
|
@ -1412,6 +1415,7 @@
|
|||
845A29091FC74B8E007B49E3 /* SingleFaviconDownloader.swift in Sources */,
|
||||
849A97851ED9ECCD007D329B /* PreferencesWindowController.swift in Sources */,
|
||||
84E850861FCB60CE0072EA88 /* AuthorAvatarDownloader.swift in Sources */,
|
||||
8414AD251FCF5A1E00955102 /* TimelineHeaderView.swift in Sources */,
|
||||
849A977A1ED9EC04007D329B /* TimelineTableCellView.swift in Sources */,
|
||||
849A97761ED9EC04007D329B /* TimelineCellAppearance.swift in Sources */,
|
||||
849A97A21ED9F180007D329B /* FeedTitleDownloader.swift in Sources */,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="13770" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="B8D-0N-5wS">
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="13526" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="B8D-0N-5wS">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="13770"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="13526"/>
|
||||
<capability name="box content view" minToolsVersion="7.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
|
@ -491,17 +491,78 @@
|
|||
<objects>
|
||||
<viewController id="36G-bQ-b96" userLabel="Timeline View Controller" customClass="TimelineViewController" customModule="Evergreen" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<view key="view" id="Dnl-L5-xFP">
|
||||
<rect key="frame" x="0.0" y="0.0" width="450" height="300"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="450" height="198"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<customView translatesAutoresizingMaskIntoConstraints="NO" id="rE6-fd-xjY" customClass="TimelineHeaderView" customModule="Evergreen" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="166" width="450" height="32"/>
|
||||
<subviews>
|
||||
<visualEffectView wantsLayer="YES" appearanceType="vibrantLight" blendingMode="withinWindow" material="appearanceBased" state="followsWindowActiveState" translatesAutoresizingMaskIntoConstraints="NO" id="KZz-oC-IY4">
|
||||
<rect key="frame" x="0.0" y="0.0" width="450" height="32"/>
|
||||
<subviews>
|
||||
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Htn-9a-fHq">
|
||||
<rect key="frame" x="8" y="8" width="16" height="16"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="16" id="JvG-d1-oHx"/>
|
||||
<constraint firstAttribute="width" constant="16" id="YXX-OZ-bYj"/>
|
||||
</constraints>
|
||||
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="NSMobileMe" id="fKm-v3-gvk"/>
|
||||
</imageView>
|
||||
<box verticalHuggingPriority="750" boxType="separator" translatesAutoresizingMaskIntoConstraints="NO" id="OEi-dC-LVf">
|
||||
<rect key="frame" x="0.0" y="-2" width="450" height="5"/>
|
||||
</box>
|
||||
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" textCompletion="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Xi3-Wb-g8i">
|
||||
<rect key="frame" x="30" y="8" width="141" height="17"/>
|
||||
<textFieldCell key="cell" lineBreakMode="truncatingTail" selectable="YES" allowsUndo="NO" sendsActionOnEndEditing="YES" title="Feed Name Goes Here" usesSingleLineMode="YES" id="rUx-Cw-Etb">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<popUpButton horizontalHuggingPriority="1000" horizontalCompressionResistancePriority="1000" translatesAutoresizingMaskIntoConstraints="NO" id="nD3-Ps-HWV">
|
||||
<rect key="frame" x="317" y="6" width="113" height="21"/>
|
||||
<popUpButtonCell key="cell" type="bevel" title="Newest at Top" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" imageScaling="proportionallyDown" inset="2" selectedItem="Va5-4d-T8y" id="4y3-td-JFr">
|
||||
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="menu"/>
|
||||
<menu key="menu" id="OsY-jU-uaW">
|
||||
<items>
|
||||
<menuItem title="Newest at Top" state="on" id="Va5-4d-T8y"/>
|
||||
<menuItem title="Oldest at Top" id="mQo-Qa-Tpy"/>
|
||||
</items>
|
||||
</menu>
|
||||
</popUpButtonCell>
|
||||
</popUpButton>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="OEi-dC-LVf" firstAttribute="leading" secondItem="KZz-oC-IY4" secondAttribute="leading" id="1Oo-pn-y0p"/>
|
||||
<constraint firstItem="nD3-Ps-HWV" firstAttribute="centerY" secondItem="KZz-oC-IY4" secondAttribute="centerY" id="4zl-gZ-IHd"/>
|
||||
<constraint firstAttribute="bottom" secondItem="OEi-dC-LVf" secondAttribute="bottom" id="PWd-tI-hJv"/>
|
||||
<constraint firstAttribute="trailing" secondItem="OEi-dC-LVf" secondAttribute="trailing" id="Tn9-sO-xyf"/>
|
||||
<constraint firstAttribute="trailing" secondItem="nD3-Ps-HWV" secondAttribute="trailing" constant="20" symbolic="YES" id="UML-wO-FtR"/>
|
||||
<constraint firstItem="nD3-Ps-HWV" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="Xi3-Wb-g8i" secondAttribute="trailing" constant="8" symbolic="YES" id="c2Q-gZ-09I"/>
|
||||
<constraint firstItem="Htn-9a-fHq" firstAttribute="centerY" secondItem="KZz-oC-IY4" secondAttribute="centerY" id="exW-Wb-cFV"/>
|
||||
<constraint firstItem="Xi3-Wb-g8i" firstAttribute="centerY" secondItem="KZz-oC-IY4" secondAttribute="centerY" id="hBe-H5-BTq"/>
|
||||
<constraint firstItem="Htn-9a-fHq" firstAttribute="leading" secondItem="KZz-oC-IY4" secondAttribute="leading" constant="8" id="uNw-GL-NKl"/>
|
||||
<constraint firstItem="Xi3-Wb-g8i" firstAttribute="leading" secondItem="Htn-9a-fHq" secondAttribute="trailing" constant="8" symbolic="YES" id="wUi-1g-qPE"/>
|
||||
</constraints>
|
||||
</visualEffectView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="KZz-oC-IY4" firstAttribute="top" secondItem="rE6-fd-xjY" secondAttribute="top" id="DHX-DN-tYv"/>
|
||||
<constraint firstAttribute="height" constant="32" id="IS4-45-UCw"/>
|
||||
<constraint firstAttribute="trailing" secondItem="KZz-oC-IY4" secondAttribute="trailing" id="K5w-RS-gmv"/>
|
||||
<constraint firstAttribute="bottom" secondItem="KZz-oC-IY4" secondAttribute="bottom" id="Qdt-ZH-ygb"/>
|
||||
<constraint firstItem="KZz-oC-IY4" firstAttribute="leading" secondItem="rE6-fd-xjY" secondAttribute="leading" id="dqI-OO-8A0"/>
|
||||
</constraints>
|
||||
</customView>
|
||||
<scrollView borderType="none" autohidesScrollers="YES" horizontalLineScroll="98" horizontalPageScroll="10" verticalLineScroll="98" verticalPageScroll="10" hasHorizontalScroller="NO" horizontalScrollElasticity="none" translatesAutoresizingMaskIntoConstraints="NO" id="Kfs-n2-RYk">
|
||||
<rect key="frame" x="0.0" y="0.0" width="450" height="300"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="450" height="166"/>
|
||||
<clipView key="contentView" id="yAN-Ex-RC7">
|
||||
<rect key="frame" x="0.0" y="0.0" width="450" height="300"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="450" height="166"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" columnReordering="NO" columnResizing="NO" autosaveColumns="NO" typeSelect="NO" rowHeight="96" viewBased="YES" id="DRs-j8-R9a" customClass="TimelineTableView" customModule="Evergreen" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="450" height="300"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="450" height="168"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<size key="intercellSpacing" width="3" height="2"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
|
@ -550,10 +611,13 @@
|
|||
</scrollView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="Kfs-n2-RYk" firstAttribute="top" secondItem="rE6-fd-xjY" secondAttribute="bottom" id="7ry-b8-6Q2"/>
|
||||
<constraint firstItem="rE6-fd-xjY" firstAttribute="leading" secondItem="Dnl-L5-xFP" secondAttribute="leading" id="D3E-uE-bLp"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Kfs-n2-RYk" secondAttribute="trailing" id="F6K-ec-Sge"/>
|
||||
<constraint firstItem="Kfs-n2-RYk" firstAttribute="leading" secondItem="Dnl-L5-xFP" secondAttribute="leading" id="Leg-dK-IeP"/>
|
||||
<constraint firstItem="Kfs-n2-RYk" firstAttribute="top" secondItem="Dnl-L5-xFP" secondAttribute="top" id="Umk-fO-tnt"/>
|
||||
<constraint firstAttribute="trailing" secondItem="rE6-fd-xjY" secondAttribute="trailing" id="Om9-UK-QCw"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Kfs-n2-RYk" secondAttribute="bottom" id="Xc2-9H-WP5"/>
|
||||
<constraint firstItem="rE6-fd-xjY" firstAttribute="top" secondItem="Dnl-L5-xFP" secondAttribute="top" id="g26-bB-vjf"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="backgroundColor">
|
||||
|
@ -592,14 +656,15 @@
|
|||
<image name="NSAddTemplate" width="11" height="11"/>
|
||||
<image name="NSGoLeftTemplate" width="9" height="12"/>
|
||||
<image name="NSGoRightTemplate" width="9" height="12"/>
|
||||
<image name="NSMobileMe" width="32" height="32"/>
|
||||
<image name="NSRefreshTemplate" width="11" height="15"/>
|
||||
<image name="NSShareTemplate" width="11" height="16"/>
|
||||
<image name="action" width="9.5" height="9.5"/>
|
||||
<image name="markAllRead" width="11" height="9.5"/>
|
||||
<image name="markRead" width="9.5" height="9.5"/>
|
||||
<image name="newFolder" width="9.5" height="9.5"/>
|
||||
<image name="nextUnread" width="9.5" height="9.5"/>
|
||||
<image name="openInBrowser" width="9.5" height="9.5"/>
|
||||
<image name="star" width="9.5" height="9.5"/>
|
||||
<image name="action" width="19" height="19"/>
|
||||
<image name="markAllRead" width="22" height="19"/>
|
||||
<image name="markRead" width="19" height="19"/>
|
||||
<image name="newFolder" width="19" height="19"/>
|
||||
<image name="nextUnread" width="19" height="19"/>
|
||||
<image name="openInBrowser" width="19" height="19"/>
|
||||
<image name="star" width="19" height="19"/>
|
||||
</resources>
|
||||
</document>
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
//
|
||||
// TimelineHeaderView.swift
|
||||
// Evergreen
|
||||
//
|
||||
// Created by Brent Simmons on 11/29/17.
|
||||
// Copyright © 2017 Ranchero Software. All rights reserved.
|
||||
//
|
||||
|
||||
import Cocoa
|
||||
|
||||
final class TimelineHeaderView: NSView {
|
||||
|
||||
private var didConfigureLayer = false
|
||||
|
||||
override var wantsUpdateLayer: Bool {
|
||||
return true
|
||||
}
|
||||
|
||||
override func updateLayer() {
|
||||
|
||||
guard !didConfigureLayer else {
|
||||
return
|
||||
}
|
||||
if let layer = layer {
|
||||
let color = appDelegate.currentTheme.color(forKey: "MainWindow.Timeline.header.backgroundColor")
|
||||
layer.backgroundColor = color.cgColor
|
||||
didConfigureLayer = true
|
||||
}
|
||||
}
|
||||
}
|
|
@ -61,6 +61,11 @@
|
|||
<string>000000</string>
|
||||
<key>gridColorAlpha</key>
|
||||
<real>0.1</real>
|
||||
<key>header</key>
|
||||
<dict>
|
||||
<key>backgroundColor</key>
|
||||
<string>#fcfcfc</string>
|
||||
</dict>
|
||||
<key>cell</key>
|
||||
<dict>
|
||||
<key>paddingLeft</key>
|
||||
|
|
Loading…
Reference in New Issue