diff --git a/src/Mod/Sketcher/Gui/Resources/icons/small/Constraint_PointOnPoint_sm.xpm b/src/Mod/Sketcher/Gui/Resources/icons/small/Constraint_PointOnPoint_sm.xpm index fa6eceff91..7f83b834d8 100644 --- a/src/Mod/Sketcher/Gui/Resources/icons/small/Constraint_PointOnPoint_sm.xpm +++ b/src/Mod/Sketcher/Gui/Resources/icons/small/Constraint_PointOnPoint_sm.xpm @@ -1,26 +1,25 @@ /* XPM */ -static char * Constraint_PointOnPoint_sm_xpm[] = { -"16 16 7 1", -" c None", -". c #991515", -"+ c #E11D1D", -"@ c #9A1414", -"# c #E21D1D", -"$ c #CC0000", -"% c #9B1414", +static char *Constraint_PointOnPoint_sm_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 16 3 1 ", +" c None", +". c #D71414", +"+ c #AA1919", +/* pixels */ " ", -" ", -" ", -" ", -" ", -" ", -" .++@ ", -" #$$# ", -" #$$# ", -" @++% ", -" ", -" ", -" ", -" ", -" ", -" "}; +" + + ", +" +.+ +.+ ", +" +.+ +.+ ", +" + + ", +" ++++ ", +" +....+ ", +" +...++ ", +" +..+++ ", +" +.++.+ ", +" ++++ ", +" + + ", +" +.+ +.+ ", +" +.+ +.+ ", +" + + ", +" " +}; diff --git a/src/Mod/Sketcher/Gui/Resources/icons/small/README.md b/src/Mod/Sketcher/Gui/Resources/icons/small/README.md index a28ecb977e..11b295e1c6 100644 --- a/src/Mod/Sketcher/Gui/Resources/icons/small/README.md +++ b/src/Mod/Sketcher/Gui/Resources/icons/small/README.md @@ -1,24 +1,47 @@ To create an XPM file from an SVG file, you need the ImageMagick libraries. Then run ``` -convert file.svg -geometry 16x16 -colors 16 file_sm.xpm +convert file.svg -geometry 16x16 -colors 8 file_sm.xpm ``` -The XPM icon is very small, 16x16 px in size, and you usually don't need -more than 16 colors. +The XPM icon is very small, 16x16 px in size, and we usually don't need +more than 8 colors. Edit the xpm file manually to do small retouches, for example, setting up the transparency and reducing the number of colors exactly to the desired ones. +An XPM image has a header that defines the number of columns, number of rows, +number of colors, and number of characters per pixel. +The first rows have the colors definition, so they must match the number +of colors, while the rest corresponds to the actual bitmap image. + The space character (empty) can be set to the color `None`, to indicate transparency. ``` /* XPM */ -static char * file_sm_xpm[] = { -"16 16 7 1", -" c None", -". c #BB1616", -"+ c #DE1515", -"@ c #BE1616", +static char *file_sm_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 16 3 1 ", +" c None", +". c #D71414", +"+ c #AA1919", +/* pixels */ +" ", +" + + ", +" +.+ +.+ ", +" +.+ +.+ ", +" + + ", +" ++++ ", +" +....+ ", +" +...++ ", +" +..+++ ", +" +.++.+ ", +" ++++ ", +" + + ", +" +.+ +.+ ", +" +.+ +.+ ", +" + + ", +" " +}; ```