Skip to content

Commit

Permalink
fix for v45
Browse files Browse the repository at this point in the history
  • Loading branch information
keremciu committed Jun 28, 2017
1 parent ee034f3 commit f57048f
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 9 deletions.
10 changes: 5 additions & 5 deletions iconfont.sketchplugin/Contents/Sketch/const/library.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ var Library = {
selected.setStringValue(icon)
// set icon name
selected.setName(name)

//use same font size
var _fontsize = selected.fontSize()
// 8. set selected font

// 8. set selected font
if (sketchVersion > 370) {
selected.setFont([NSFont fontWithName:@""+fontname size:_fontsize])
} else {
Expand Down Expand Up @@ -190,7 +190,7 @@ var Library = {
}

// deselect all selected layers
doc.currentPage().deselectAllLayers()
// doc.currentPage().deselectAllLayers()

// select the text layer
[textLayer select:true byExpandingSelection:true];
Expand Down Expand Up @@ -333,7 +333,7 @@ var Library = {
shape.style = layer.style()
var style = shape.style()

if(!style.fill()) {
if(style.fill === undefined) {
if (sketchVersion > 370) {
var fill = style.addStylePartOfType(0)
} else {
Expand Down
2 changes: 1 addition & 1 deletion iconfont.sketchplugin/Contents/Sketch/convert.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ var onRun = function(context) {
var layerPredicate = NSPredicate.predicateWithFormat(predicate);
var layers = [scope filteredArrayUsingPredicate:layerPredicate];

[[doc currentPage] deselectAllLayers];
// [[doc currentPage] deselectAllLayers];
var loop = [layers objectEnumerator], layer;

while (layer = [loop nextObject]) {
Expand Down
7 changes: 4 additions & 3 deletions iconfont.sketchplugin/Contents/Sketch/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,9 @@
]
},
"identifier" : "com.keremciu.sketch.iconfont",
"version" : "4.5.1",
"version" : "4.5.3",
"description" : "Use icons like a boss.",
"name" : "Icons",
"authorEmail" : "[email protected]"
}
"authorEmail" : "[email protected]",
"appcast" : "https://raw.githubusercontent.com/keremciu/sketch-iconfont/version.xml"
}
20 changes: 20 additions & 0 deletions iconfont.sketchplugin/Contents/Sketch/version.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Icons</title>
<link>https://github.com/keremciu/sketch-iconfont</link>
<description>Use icons like a boss.</description>
<language>en</language>
<item>
<title>Version 4.5.3</title>
<description>
<![CDATA[
<ul>
<li>Fixes for Sketch 45</li>
</ul>
]]>
</description>
<enclosure url="https://github.com/keremciu/sketch-iconfont/archive/master.zip" sparkle:version="4.5.3" />
</item>
</channel>
</rss>

0 comments on commit f57048f

Please sign in to comment.