To make GeoMOOSE more efficient all toolbar and layer controls have been combined into a single image. All of the tool images are changed by manipulating CSS settings.
The sprite has two columns. The left column is the tool in its “normal” state and the right column contains the tool in its “selected” state. Each row represents a different tool.
The sprite is generated with the “createSprite.py” script located in the “tools” directory. The “createSprite.py” script also generates the CSS. The CSS outputs to the standard output. The general operation for generating the sprite is as follows:
To specify an image for a “selected” tool add an image in the images/toolbar directory with “-selected” included at the end of the name. For example, the popups tool has two images in the toolbar directory: “popups.png”, “popups-selected.png”. When createSprite.py runs it searches the directory for the “selected” images and places them in the right-column of the sprite as appropriate.
The toolbar styling has two components:
The sprite imaging layout explained above.
.Tool and .selected.
- .Tool – defines the basic CSS for laying out the tool.
- .selected – defines additional information when the tool is selected. In the default installation this makes the toolbar tool background grey.
..note:: You will need to have Python installed on your computer to run this script. If you are running Windows, you probably need to get PIL library for Python. See http://www.pythonware.com/products/pil/