papirus-icon-theme/tools/work/README.md

169 lines
4.8 KiB
Markdown
Raw Normal View History

# For Developers and Designers
2016-12-06 06:42:43 -05:00
Designing icons for Papirus is easy :)
2016-12-07 01:36:55 -05:00
2017-01-11 10:32:22 -05:00
You only need to draw icons for Papirus and then use our script to convert colors for ePapirus, Papirus Dark and Papirus-Light.
2016-12-08 04:49:09 -05:00
## Basic concepts
2016-12-26 17:49:23 -05:00
Papirus is a SVG-based icon theme for Linux, drawing inspiration from Material Design and flat design.
2016-12-08 04:49:09 -05:00
All elements are clear, distinct and have outlines. Another main feature that distinguishes our theme is its use of warm color tones.
2016-12-08 04:49:09 -05:00
Keeping this in mind, **please do not use** very bright and toxic colors for Papirus.
2016-12-27 00:47:33 -05:00
Examples are available in the main icon theme folders. In the `work` directory, you'll only find templates and scripts.
2016-12-11 02:50:00 -05:00
2016-12-26 17:49:23 -05:00
#### Main icons
Main icons have the following sizes: 16px, 22px, 24px, 32px and 48px. Also available are some 64px icons for Apps, Devices, Places and Mimes.
2016-12-08 04:49:09 -05:00
> Why do we need so many sizes for a SVG?
2016-12-08 04:49:09 -05:00
Because if we use a single size for all then the icons will be blurred. All objects on Papirus have pixelated alignment.
2016-12-08 04:49:09 -05:00
2016-12-26 17:49:23 -05:00
#### Monochrome icons
2016-12-06 07:18:33 -05:00
2016-12-26 17:49:23 -05:00
Papirus now also supports KDE color scheme for monochrome actions, devices, places and panel icons. You can find more detailed info about that [here](https://techbase.kde.org/Development/Tutorials/Plasma5/ThemeDetails#Colors).
2016-12-06 06:42:43 -05:00
Presently we only support the following icons:
2016-12-26 17:49:23 -05:00
2016-12-06 06:42:43 -05:00
- actions (16px, 22px, 24px)
- devices (16px)
- places (16px)
- panel (22px, 24px)
2016-12-11 06:59:31 -05:00
## System Requirements
2016-12-26 17:49:23 -05:00
2016-12-08 04:49:09 -05:00
- inkscape
- npm
- svgo
2016-12-06 14:44:52 -05:00
2016-12-08 04:49:09 -05:00
For Debian/Ubuntu/Linux Mint users:
2016-12-26 17:49:23 -05:00
2016-12-06 14:44:52 -05:00
```
2016-12-08 04:49:09 -05:00
sudo apt update
sudo apt install inkscape npm nodejs-legacy
sudo npm install -g npm svgo
2016-12-06 14:44:52 -05:00
```
2016-12-26 17:49:23 -05:00
## Step-by-Step Guide
2016-12-06 14:52:33 -05:00
2016-12-26 17:49:23 -05:00
### 1. Getting Started
2016-12-27 00:47:33 -05:00
Open directory `work` in a file manager and open a terminal at the directory. You can do it from the context menu entry `Open in Terminal` or `Action → Open Terminal Here`.
2016-12-06 06:42:43 -05:00
2016-12-26 17:49:23 -05:00
- #### Create a new icon
2017-01-11 10:32:22 -05:00
Create a new icon from the provided template using the script `tools/work/new-icons.sh`. For all new icons, **please stick to using the template**. This is because the template already has some needed objects, like a CSS stylesheet.
2016-12-26 17:49:23 -05:00
```
2016-12-27 00:47:33 -05:00
# For example
2016-12-11 05:08:05 -05:00
2016-12-26 17:49:23 -05:00
./new-icons.sh apps abricotine
2016-12-11 05:08:05 -05:00
2016-12-28 05:35:56 -05:00
# It creates the following files inside work directory
# from the template files:
2017-01-03 14:09:18 -05:00
#
2016-12-26 17:49:23 -05:00
# ./Papirus/apps/abricotine@16x16.svg
# ./Papirus/apps/abricotine@22x22.svg
# ./Papirus/apps/abricotine@24x24.svg
# ./Papirus/apps/abricotine@32x32.svg
# ./Papirus/apps/abricotine@48x48.svg
# ./Papirus/apps/abricotine@64x64.svg
```
2016-12-11 05:08:05 -05:00
2016-12-26 17:49:23 -05:00
- #### Edit an existing icon
2016-12-27 00:47:33 -05:00
If you want modify an existing icon, you can do that using the script `tools/work/copy-from-theme.sh`.
2016-12-26 17:49:23 -05:00
```
2016-12-27 00:47:33 -05:00
# For example
2016-12-26 17:49:23 -05:00
./copy-from-theme.sh panel transmission-tray-icon.svg
2016-12-28 05:35:56 -05:00
# It copies following files into work directory from the
# main icon theme folders:
2017-01-03 14:09:18 -05:00
#
2017-01-03 14:18:58 -05:00
# ./ePapirus/panel/transmission-tray-icon@22x22.svg
# ./ePapirus/panel/transmission-tray-icon@24x24.svg
# ./Papirus/panel/transmission-tray-icon@22x22.svg
# ./Papirus/panel/transmission-tray-icon@24x24.svg
# ./Papirus-Dark/panel/transmission-tray-icon@22x22.svg
# ./Papirus-Dark/panel/transmission-tray-icon@24x24.svg
# ./Papirus-Light/panel/transmission-tray-icon@22x22.svg
# ./Papirus-Light/panel/transmission-tray-icon@24x24.svg
2016-12-26 17:49:23 -05:00
```
2016-12-27 00:47:33 -05:00
**IMPORTANT:** Please don't remove suffixes from the filename as it's needed for other scripts. Filename extension must be in lowercase.
2016-12-26 17:49:23 -05:00
### 2. Papirus
1. Open the created/copied file on Inkscape.
2. Delete any objects you do not need.
3. Draw new objects.
4. Save file with same filename.
5. Repeat it for other sizes.
### 3. Papirus Dark
2016-12-28 05:35:56 -05:00
1. Run script `tools/work/convert-to-dark.sh`. It copies needed icons from `work/Papirus` to `work/Papirus-Dark` and changes its colors.
2016-12-26 17:49:23 -05:00
2016-12-28 05:35:56 -05:00
**IMPORTANT:** You should draw icons for Papirus first.
2016-12-26 17:49:23 -05:00
```
./convert-to-dark.sh
```
2016-12-27 00:47:33 -05:00
2. Check result and edit manually if needed.
2016-12-26 17:49:23 -05:00
### 4. Papirus Light
1. Run script `tools/work/convert-to-light.sh`. It copies needed icons from `work/Papirus` to `work/Papirus-Light` and changes its colors.
**IMPORTANT:** You should draw icons for Papirus first.
```
./convert-to-light.sh
```
2. Check result and edit manually if needed.
### 5. ePapirus
2016-12-26 17:49:23 -05:00
2016-12-27 00:47:33 -05:00
1. Run script `tools/work/convert-to-e.sh`. It copies needed icons from `work/Papirus` to `work/ePapirus` and changes its colors.
2016-12-26 17:49:23 -05:00
2016-12-28 05:35:56 -05:00
**IMPORTANT:** You should draw icons for Papirus first.
2016-12-26 17:49:23 -05:00
```
./convert-to-e.sh
```
2016-12-27 00:47:33 -05:00
2. Check result and edit manually if needed.
2016-12-26 17:49:23 -05:00
### 6. Final Steps
2016-12-26 17:49:23 -05:00
1. Run script `tools/ffsvg.sh` for cleaning and fixing the icons:
```
../ffsvg.sh ePapirus/ Papirus/ Papirus-Dark/ Papirus-Light/
2016-12-26 17:49:23 -05:00
```
2. Please check your icons again.
2016-12-27 00:47:33 -05:00
3. If everything is fine then copy icons into main icon theme folders:
2016-12-26 17:49:23 -05:00
```
./copy-to-theme.sh
```
4. Clean the `work` directory:
```
./clean.sh
```
5. Everything is ready now! You can commit the changes to GitHub.