Skip to content

Commit

Permalink
Added ability to set a default emoji size from the collection settings
Browse files Browse the repository at this point in the history
Closes #1.
  • Loading branch information
nathanielw committed Dec 12, 2015
1 parent 85289c3 commit dae5647
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Emoji for Pencil

Twitter Emoji as a Pencil stencil collection - drag-and-drop emoji into your mockups! :thumbsup:
Twitter Emoji as a [Pencil](https://github.com/prikhi/pencil) stencil collection - drag-and-drop emoji into your mockups! :thumbsup:

*Check out my other stencil collections for Pencil at [nathanielw.github.io/pencil-stencils](http://nathanielw.github.io/pencil-stencils/)*

Expand All @@ -12,6 +12,9 @@ Twitter Emoji as a Pencil stencil collection - drag-and-drop emoji into your moc
### Updating
Right-click on the collection in Pencil's sidebar and choose _Uninstall this collection_ before repeating the installation steps.

### Using
Drag-and-drop emoji from the _Collections_ panel onto your mockups. Easy. If you want to change the default emoji size, right-click on the collection in the _Collections_ panel, select _Collection settings_ and enter the desired size (it's `16,16` by default).

## Generating the Collection
- Clone this repo with the `--recursive` flag to include submodules. (or just clone it normally then `git submodule init` and `git submodule update`)
- Run the `generate-xml.py` script (tested with Python 3.4).
Expand Down
7 changes: 6 additions & 1 deletion stylesheet.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@

Source code for generating this stencil collection can be found at https://github.com/nathanielw/Emoji-for-Pencil and is licensed under the MIT License."
author="Emoji graphics by Twitter used under CC-BY 4.0. Pencil Stencil by Nathaniel Watson (nwatson.nz)"
url="https://github.com/nathanielw/Twemoji-for-Pencil">
<Properties>
<PropertyGroup name="Collection settings">
<Property name="size" displayName="Default emoji size (width,height)" type="PlainText">16,16</Property>
</PropertyGroup>
</Properties>

<xsl:apply-templates/>
</Shapes>
Expand All @@ -27,7 +32,7 @@
<Shape id="{./@id}" displayName="{./@name}" icon="{./@icon}">
<Properties>
<PropertyGroup>
<Property name="box" type="Dimension" p:lockRatio="true">16,16</Property>
<Property name="box" type="Dimension" p:lockRatio="true"><E>$$size</E></Property>
</PropertyGroup>
</Properties>

Expand Down

0 comments on commit dae5647

Please sign in to comment.