Issue 2134: removed obsolete raw highlight preservation setting from GUI (still left in procparams for backwards compatilibility)
This commit is contained in:
52
tools/source_icons/script/change_colour.bash
Executable file
52
tools/source_icons/script/change_colour.bash
Executable file
@@ -0,0 +1,52 @@
|
||||
#! /bin/bash
|
||||
|
||||
### arg1 : this script takes as input a directory which
|
||||
### contains the svg files for the icon set.
|
||||
### arg2: it creates in the output directory the svg files
|
||||
### for the desired colour
|
||||
### arg3: the colour name (in hexadecimal) to be used for the icon
|
||||
### arg4: the colour name (in hexadecimal) to be used for the gradient
|
||||
|
||||
DIR_IN=$1
|
||||
DIR_OUT=$2
|
||||
COLOUR_BG=$3
|
||||
|
||||
OPACITY=0.85
|
||||
|
||||
|
||||
if [ $# -lt 3 ]
|
||||
then
|
||||
echo "Usage: $(basename $0) {input svg directory} {output svg directory} {colour name (hexadecimal)}"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ $# -eq 4 ]
|
||||
then
|
||||
COLOUR_GRADIENT=$4
|
||||
else
|
||||
COLOUR_GRADIENT="#ffffff"
|
||||
fi
|
||||
|
||||
### ORIGINAL = #2a7fff
|
||||
### PURPLE = #843382
|
||||
### GRAY 60% = #666666
|
||||
### DARK THEME = #D2D2D2
|
||||
### LIGHT THEME = #252525
|
||||
|
||||
|
||||
ORIGINAL="#2a7fff" ### it is the default colour which has been used to develop the gold standard icon set
|
||||
for SVG in $(ls $DIR_IN/*.svg)
|
||||
do
|
||||
# sed -e "s/$ORIGINAL/$COLOUR_BG/g" $SVG > $DIR_OUT/$(basename $SVG)
|
||||
|
||||
sed -e "s/style=\"opacity:0.69.*;fill:$ORIGINAL/style=\"opacity:$OPACITY;fill:$COLOUR_BG/g" -e "s/style=\"opacity:0.7*;fill:$ORIGINAL/style=\"opacity:$OPACITY;fill:$COLOUR_BG/g" -e "s/$ORIGINAL/$COLOUR_BG/g" -e "s/style=\"stop-color:\#ffffff;/style=\"stop-color:$COLOUR_GRADIENT;/g" $SVG > $DIR_OUT/$(basename $SVG)
|
||||
|
||||
|
||||
FILE_NAME=${SVG%.svg}
|
||||
FILE=$FILE_NAME.file
|
||||
cp $FILE $DIR_OUT
|
||||
|
||||
done
|
||||
|
||||
|
||||
#cp $DIR_IN/index.theme $DIR_OUT
|
78
tools/source_icons/script/make_all_icon_theme.bash
Executable file
78
tools/source_icons/script/make_all_icon_theme.bash
Executable file
@@ -0,0 +1,78 @@
|
||||
#! /bin/bash
|
||||
|
||||
### arg1 : this script takes as input a directory which
|
||||
### contains the svg files for the gold standard icon set.
|
||||
### arg2: it creates in the output directory the png files
|
||||
|
||||
### make_all_icon_theme.bash tools/icons_source/scalable /tmp/png
|
||||
|
||||
DIR_IN=$1
|
||||
DIR_OUT=$2
|
||||
|
||||
|
||||
if [ $# -lt 2 ]
|
||||
then
|
||||
echo "Usage: $(basename $0) {input svg directory} {output directory}"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
if [ ! -d $DIR_OUT ]
|
||||
then
|
||||
mkdir $DIR_OUT
|
||||
else
|
||||
rm -r $DIR_OUT/*
|
||||
fi
|
||||
|
||||
if [ ! -d $DIR_OUT/Dark ]
|
||||
then
|
||||
mkdir $DIR_OUT/Dark
|
||||
fi
|
||||
|
||||
if [ ! -d $DIR_OUT/Light ]
|
||||
then
|
||||
mkdir $DIR_OUT/Light
|
||||
fi
|
||||
|
||||
|
||||
rm -r $DIR_OUT/Dark/*
|
||||
rm -r $DIR_OUT/Light/*
|
||||
|
||||
### make all icon with generic option
|
||||
./make_icon_theme.bash $DIR_IN $DIR_OUT/Dark "#BBBBBB" "#FFFFFF"
|
||||
./make_icon_theme.bash $DIR_IN $DIR_OUT/Light "#252525" "#7D7D7D"
|
||||
|
||||
### make custom icon with specific option
|
||||
if [ ! -d $DIR_OUT/Light/tmp ]
|
||||
then
|
||||
mkdir $DIR_OUT/Light/tmp
|
||||
fi
|
||||
|
||||
if [ ! -d $DIR_OUT/Dark/tmp ]
|
||||
then
|
||||
mkdir $DIR_OUT/Dark/tmp
|
||||
fi
|
||||
|
||||
cp $DIR_IN/closedhand.* $DIR_OUT/Dark/tmp
|
||||
cp $DIR_IN/closedhand.* $DIR_OUT/Light/tmp
|
||||
|
||||
./make_icon_theme.bash $DIR_OUT/Dark/tmp $DIR_OUT/Dark "#BBBBBB" "#000000"
|
||||
./make_icon_theme.bash $DIR_OUT/Light/tmp $DIR_OUT/Light "#252525" "#FFFFFF"
|
||||
|
||||
DIR_TMP=/tmp/icons
|
||||
|
||||
if [ ! -d $DIR_TMP ]
|
||||
then
|
||||
mkdir $DIR_TMP
|
||||
fi
|
||||
|
||||
cp -r $DIR_OUT/* $DIR_TMP
|
||||
mv $DIR_TMP/Dark/*.png $DIR_TMP/Dark/actions
|
||||
mv $DIR_TMP/Light/*.png $DIR_TMP/Light/actions
|
||||
/bin/rm -r $DIR_TMP/Dark/*.file $DIR_TMP/Dark/tmp
|
||||
/bin/rm -r $DIR_TMP/Light/*.file $DIR_TMP/Light/tmp
|
||||
|
||||
cd /tmp
|
||||
tar cvf iconsets.tar icons
|
||||
bzip2 iconsets.tar
|
||||
mv iconsets.tar.bz2 $DIR_OUT
|
39
tools/source_icons/script/make_icon_theme.bash
Executable file
39
tools/source_icons/script/make_icon_theme.bash
Executable file
@@ -0,0 +1,39 @@
|
||||
#! /bin/bash
|
||||
|
||||
### arg1 : this script takes as input a directory which
|
||||
### contains the svg files for the gold standard icon set.
|
||||
### arg2: it creates in the output directory the png files
|
||||
### for the desired size
|
||||
### arg3: the colour name (in hexadecimal) to be used
|
||||
|
||||
|
||||
### Light Theme
|
||||
### ./make_icon_theme.bash ../svg/ /tmp/png/ "#252525" "#7D7D7D"
|
||||
|
||||
### Dark Theme
|
||||
### ./make_icon_theme.bash ../svg/ /tmp/png/ "#D2D2D2" "#FFFFFF"
|
||||
|
||||
|
||||
DIR_IN=$1
|
||||
DIR_OUT=$2
|
||||
COLOUR_BG=$3
|
||||
COLOUR_GRADIENT=$4
|
||||
|
||||
if [ $# -lt 3 ]
|
||||
then
|
||||
echo "Usage: $(basename $0) {input svg directory} {output directory} {background colour name (hexadecimal)} {option: gradient colour name (hexadecimal)}"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
if [ $# -eq 4 ]
|
||||
then
|
||||
./change_colour.bash $DIR_IN $DIR_OUT $COLOUR_BG $COLOUR_GRADIENT
|
||||
else
|
||||
./change_colour.bash $DIR_IN $DIR_OUT $COLOUR_BG
|
||||
fi
|
||||
./svg2png.bash $DIR_OUT $DIR_OUT $WIDTH
|
||||
rm $DIR_OUT/*.svg
|
||||
|
||||
|
||||
|
64
tools/source_icons/script/svg2png.bash
Executable file
64
tools/source_icons/script/svg2png.bash
Executable file
@@ -0,0 +1,64 @@
|
||||
#! /bin/bash
|
||||
|
||||
### arg1 : this script takes as input a directory which
|
||||
### contains the svg files for the gold standard icon set.
|
||||
### arg2: it creates in the output directory the png files
|
||||
### for the desired size
|
||||
|
||||
|
||||
DIR_IN=$1
|
||||
DIR_OUT=$2
|
||||
|
||||
DIR_TMP=/tmp
|
||||
|
||||
if [ $# -ne 2 ]
|
||||
then
|
||||
echo "Usage: $(basename $0) {input svg directory} {output directory} {width (in pixel)}"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ ! -d $DIR_OUT/actions ]
|
||||
then
|
||||
mkdir $DIR_OUT/actions
|
||||
fi
|
||||
|
||||
if [ ! -d $DIR_OUT/devices ]
|
||||
then
|
||||
mkdir $DIR_OUT/devices
|
||||
fi
|
||||
|
||||
if [ ! -d $DIR_OUT/places ]
|
||||
then
|
||||
mkdir $DIR_OUT/places
|
||||
fi
|
||||
|
||||
|
||||
|
||||
for SVG in $(ls $DIR_IN/*.svg)
|
||||
do
|
||||
echo $SVG
|
||||
|
||||
FILE=$(basename $SVG)
|
||||
FILE_NAME=${FILE%.svg}
|
||||
FILE=$FILE_NAME.file
|
||||
|
||||
if [ -f $DIR_TMP/$FILE_NAME.bash ]
|
||||
then
|
||||
rm $DIR_TMP/$FILE_NAME.bash
|
||||
fi
|
||||
|
||||
echo "#! /bin/bash" > $DIR_TMP/$FILE_NAME.bash
|
||||
if [[ $OSTYPE == msys || $OSTYPE == MSYS ]]; then
|
||||
awk -v s="$SVG" -v d="$DIR_OUT" -F, '{print "\"/c/Program Files (x86)/Inkscape/inkscape.exe\" " s " --export-png=" d "/" $1 " -" $2}' $DIR_IN/$FILE >> $DIR_TMP/$FILE_NAME.bash
|
||||
else
|
||||
awk -v s="$SVG" -v d="$DIR_OUT" -F, '{print "inkscape " s " --export-png=" d "/" $1 " -" $2}' $DIR_IN/$FILE >> $DIR_TMP/$FILE_NAME.bash
|
||||
fi
|
||||
|
||||
awk -v s="$SVG" -v d="$DIR_OUT" -F, '{print "mv " d "/" $1 " " d "/" $3}' $DIR_IN/$FILE >> $DIR_TMP/$FILE_NAME.bash
|
||||
|
||||
chmod +x $DIR_TMP/$FILE_NAME.bash
|
||||
$DIR_TMP/$FILE_NAME.bash
|
||||
|
||||
rm $DIR_TMP/$FILE_NAME.bash
|
||||
|
||||
done
|
Reference in New Issue
Block a user