No need to keep rendering GTK+3 assets (#130)

* No need to keep rendering GTK+3 assets

* Add instructions on how to cleanup assets
master
David Mohammed 2018-09-25 14:31:44 +01:00 committed by GitHub
parent 58330c4a5b
commit 63d05e22dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 11 deletions

View File

@ -35,3 +35,5 @@ Because this theme is heavily based on the pixmap engine, a lot of the styling c
* Save `assets.svg` and delete the images corresponding to the edited .svg objects from the `assets` folder (or just delete everything in the `assets` folder)
* Run `./render-assets.sh` or `./render-dark-assets.sh` from a terminal
* N.B. If you are making color changes then remove the contents of the folders gtk-2.0/assets/* gtk-2.0/assets-dark and the assets folder under the GTK+3 folder that the theme is compiled for

View File

@ -9,15 +9,20 @@ ASSETS_DIR="assets"
i="$1"
echo "Rendering '$ASSETS_DIR/$i.png'"
"$INKSCAPE" --export-id="$i" \
--export-id-only \
--export-png="$ASSETS_DIR/$i.png" "$SRC_FILE" >/dev/null \
&& "$OPTIPNG" -o7 --quiet "$ASSETS_DIR/$i.png"
result_file="$ASSETS_DIR/$i.png"
if [[ -f "${result_file}" ]] ; then
echo "${result_file} already exists."
else
echo "Rendering '$ASSETS_DIR/$i.png'"
"$INKSCAPE" --export-id="$i" \
--export-id-only \
--export-png="$ASSETS_DIR/$i.png" "$SRC_FILE" >/dev/null \
&& "$OPTIPNG" -o7 --quiet "$ASSETS_DIR/$i.png"
echo "Rendering '$ASSETS_DIR/$i@2.png'"
"$INKSCAPE" --export-id="$i" \
--export-id-only \
--export-dpi=192 \
--export-png="$ASSETS_DIR/$i@2.png" "$SRC_FILE" >/dev/null \
&& "$OPTIPNG" -o7 --quiet "$ASSETS_DIR/$i@2.png"
echo "Rendering '$ASSETS_DIR/$i@2.png'"
"$INKSCAPE" --export-id="$i" \
--export-id-only \
--export-dpi=192 \
--export-png="$ASSETS_DIR/$i@2.png" "$SRC_FILE" >/dev/null \
&& "$OPTIPNG" -o7 --quiet "$ASSETS_DIR/$i@2.png"
fi