Skip to content

Commit

Permalink
Update icons used for sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
lukakerr committed Mar 1, 2019
1 parent 59a3d9e commit a3db6ea
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 6 deletions.
18 changes: 18 additions & 0 deletions Twig/Assets.xcassets/Folder.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"images" : [
{
"idiom" : "mac",
"filename" : "folder.png",
"scale" : "1x"
},
{
"idiom" : "mac",
"filename" : "[email protected]",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file added Twig/Assets.xcassets/Folder.imageset/folder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions Twig/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -1019,7 +1019,7 @@
<imageCell key="cell" refusesFirstResponder="YES" imageScaling="proportionallyDown" image="NSFolder" id="chW-9g-7sj"/>
</imageView>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="jim-ka-AcL">
<rect key="frame" x="24" y="5" width="96" height="19"/>
<rect key="frame" x="24" y="6" width="96" height="19"/>
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="Table View Cell" drawsBackground="YES" id="h2R-C8-lff">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
Expand All @@ -1028,9 +1028,9 @@
</textField>
</subviews>
<constraints>
<constraint firstItem="gNL-hb-hhd" firstAttribute="top" secondItem="jim-ka-AcL" secondAttribute="top" constant="-1" id="1Ea-TL-DGN"/>
<constraint firstItem="jim-ka-AcL" firstAttribute="top" secondItem="ooL-k5-Ykk" secondAttribute="top" constant="6" id="EPg-9S-m0L"/>
<constraint firstItem="gNL-hb-hhd" firstAttribute="bottom" secondItem="jim-ka-AcL" secondAttribute="bottom" id="PEy-T9-X6c"/>
<constraint firstItem="gNL-hb-hhd" firstAttribute="top" secondItem="jim-ka-AcL" secondAttribute="top" id="1Ea-TL-DGN"/>
<constraint firstItem="jim-ka-AcL" firstAttribute="top" secondItem="ooL-k5-Ykk" secondAttribute="top" constant="5" id="EPg-9S-m0L"/>
<constraint firstItem="gNL-hb-hhd" firstAttribute="bottom" secondItem="jim-ka-AcL" secondAttribute="bottom" constant="1" id="PEy-T9-X6c"/>
<constraint firstItem="jim-ka-AcL" firstAttribute="leading" secondItem="gNL-hb-hhd" secondAttribute="trailing" constant="5" id="So7-Eq-gyB"/>
<constraint firstItem="gNL-hb-hhd" firstAttribute="top" secondItem="ooL-k5-Ykk" secondAttribute="top" constant="5" id="Tso-Ui-KlG"/>
<constraint firstAttribute="bottom" secondItem="gNL-hb-hhd" secondAttribute="bottom" constant="5" id="XWf-oB-fSl"/>
Expand Down
6 changes: 4 additions & 2 deletions Twig/Controllers/SidebarViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -291,11 +291,13 @@ extension SidebarViewController: NSOutlineViewDelegate {
view?.textField?.stringValue = item.getName()

if item.isDirectory {
view?.imageView?.image = NSImage(named: NSImage.folderName)
view?.imageView?.image = NSImage(named: "Folder")
} else {
view?.imageView?.image = NSWorkspace.shared.icon(forFileType: item.fileType)
view?.imageView?.image = NSImage(named: "Markdown")
}

view?.imageView?.image?.isTemplate = true

return view
}

Expand Down

0 comments on commit a3db6ea

Please sign in to comment.