Updated some of the graphics to be more correct and added the Edit button to the Master view.

This commit is contained in:
Maurice Parker 2019-04-16 20:56:02 -05:00
parent 056b524122
commit 694def74bf
17 changed files with 36 additions and 17 deletions

View File

@ -205,11 +205,14 @@
</barButtonItem> </barButtonItem>
</toolbarItems> </toolbarItems>
<navigationItem key="navigationItem" title="Feeds" id="Zdf-7t-Un8"> <navigationItem key="navigationItem" title="Feeds" id="Zdf-7t-Un8">
<barButtonItem key="leftBarButtonItem" title="Tools" image="toolsImage" id="2lM-3y-hKs"> <leftBarButtonItems>
<connections> <barButtonItem image="settingsImage" id="7xz-3z-0PJ"/>
<action selector="showOPMLImportExport:" destination="7bK-jq-Zjz" id="qIa-yP-E6a"/> <barButtonItem title="Tools" image="toolsImage" id="2lM-3y-hKs">
</connections> <connections>
</barButtonItem> <action selector="showOPMLImportExport:" destination="7bK-jq-Zjz" id="qIa-yP-E6a"/>
</connections>
</barButtonItem>
</leftBarButtonItems>
</navigationItem> </navigationItem>
<simulatedToolbarMetrics key="simulatedBottomBarMetrics"/> <simulatedToolbarMetrics key="simulatedBottomBarMetrics"/>
</tableViewController> </tableViewController>
@ -280,10 +283,11 @@
</scene> </scene>
</scenes> </scenes>
<resources> <resources>
<image name="browserImage" width="20" height="20"/> <image name="browserImage" width="22" height="22"/>
<image name="circleOpenImage" width="20" height="20"/> <image name="circleOpenImage" width="22" height="22"/>
<image name="starOpenImage" width="18" height="18"/> <image name="settingsImage" width="24" height="24"/>
<image name="toolsImage" width="20" height="18"/> <image name="starOpenImage" width="24" height="24"/>
<image name="toolsImage" width="24" height="22"/>
</resources> </resources>
<inferredMetricsTieBreakers> <inferredMetricsTieBreakers>
<segue reference="RT3-gH-cyN"/> <segue reference="RT3-gH-cyN"/>

View File

@ -92,7 +92,7 @@ class MasterTableViewCell : UITableViewCell {
override func layoutSubviews() { override func layoutSubviews() {
super.layoutSubviews() super.layoutSubviews()
let layout = MasterTableViewCellLayout(cellSize: bounds.size, shouldShowImage: shouldShowImage, label: titleView, unreadCountView: unreadCountView) let layout = MasterTableViewCellLayout(cellSize: bounds.size, shouldShowImage: shouldShowImage, label: titleView, unreadCountView: unreadCountView, isEditing: isEditing)
layoutWith(layout) layoutWith(layout)
} }

View File

@ -21,13 +21,14 @@ struct MasterTableViewCellLayout {
let titleRect: CGRect let titleRect: CGRect
let unreadCountRect: CGRect let unreadCountRect: CGRect
init(cellSize: CGSize, shouldShowImage: Bool, label: UILabel, unreadCountView: MasterUnreadCountView) { init(cellSize: CGSize, shouldShowImage: Bool, label: UILabel, unreadCountView: MasterUnreadCountView, isEditing: Bool) {
let bounds = CGRect(x: 0.0, y: 0.0, width: floor(cellSize.width), height: floor(cellSize.height)) let bounds = CGRect(x: 0.0, y: 0.0, width: floor(cellSize.width), height: floor(cellSize.height))
var rFavicon = CGRect.zero var rFavicon = CGRect.zero
if shouldShowImage { if shouldShowImage {
rFavicon = CGRect(x: MasterTableViewCellLayout.imageMarginLeft, y: 0.0, width: MasterTableViewCellLayout.imageSize.width, height: MasterTableViewCellLayout.imageSize.height) let indent = isEditing ? MasterTableViewCellLayout.imageMarginLeft + 40 : MasterTableViewCellLayout.imageMarginLeft
rFavicon = CGRect(x: indent, y: 0.0, width: MasterTableViewCellLayout.imageSize.width, height: MasterTableViewCellLayout.imageSize.height)
rFavicon = MasterTableViewCellLayout.centerVertically(rFavicon, bounds) rFavicon = MasterTableViewCellLayout.centerVertically(rFavicon, bounds)
} }
self.faviconRect = rFavicon self.faviconRect = rFavicon

View File

@ -30,6 +30,8 @@ class MasterViewController: UITableViewController, UndoableCommandRunner {
super.viewDidLoad() super.viewDidLoad()
navigationItem.rightBarButtonItem = editButtonItem
NotificationCenter.default.addObserver(self, selector: #selector(unreadCountDidChange(_:)), name: .UnreadCountDidChange, object: nil) NotificationCenter.default.addObserver(self, selector: #selector(unreadCountDidChange(_:)), name: .UnreadCountDidChange, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(containerChildrenDidChange(_:)), name: .ChildrenDidChange, object: nil) NotificationCenter.default.addObserver(self, selector: #selector(containerChildrenDidChange(_:)), name: .ChildrenDidChange, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(batchUpdateDidPerform(_:)), name: .BatchUpdateDidPerform, object: nil) NotificationCenter.default.addObserver(self, selector: #selector(batchUpdateDidPerform(_:)), name: .BatchUpdateDidPerform, object: nil)

View File

@ -2,7 +2,7 @@
"images" : [ "images" : [
{ {
"idiom" : "universal", "idiom" : "universal",
"filename" : "Safari.pdf" "filename" : "safari.pdf"
} }
], ],
"info" : { "info" : {

View File

@ -2,7 +2,7 @@
"images" : [ "images" : [
{ {
"idiom" : "universal", "idiom" : "universal",
"filename" : "circlefilled.pdf" "filename" : "circleClosed.pdf"
} }
], ],
"info" : { "info" : {

View File

@ -2,7 +2,7 @@
"images" : [ "images" : [
{ {
"idiom" : "universal", "idiom" : "universal",
"filename" : "circleopen.pdf" "filename" : "circleOpen.pdf"
} }
], ],
"info" : { "info" : {

View File

@ -0,0 +1,12 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "settings.pdf"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

View File

@ -2,7 +2,7 @@
"images" : [ "images" : [
{ {
"idiom" : "universal", "idiom" : "universal",
"filename" : "star.pdf" "filename" : "starClosed.pdf"
} }
], ],
"info" : { "info" : {

View File

@ -2,7 +2,7 @@
"images" : [ "images" : [
{ {
"idiom" : "universal", "idiom" : "universal",
"filename" : "staropen.pdf" "filename" : "starOpen.pdf"
} }
], ],
"info" : { "info" : {