Customizing the PTViewer toolbar

The toolbar can be customized by editing a GIF file that contains the images of the buttons:

You can save this file on your computer (just right-click it and choose "Save image as..." or similar) and modify it. Then you can use the "toolbarImage" parameter to make ptviewer load the edited file instead of its default. For example:

...
<param name="toolbarImage" value="toolbar.gif">
...

How to edit the image file

You must not change the size of the image, and each button has a fixed size. As you can see the image file contains the images of the various states of each button.

Each button image is 27 pixels wide and 19 pixels high, so each button image is two pixels wider and higher than the default button images. You can draw each button image as you like.

PTViewer draws the toolbar's background as a rectangle with a one pixel border. The color of the border is read from the pixel at (0, 0), while the background color is read from the pixel at (298, 11).

The filled rectangle at the extreme right represents the progress bar: the progress bar color is read from the pixel at (306, 11).

You can change the color of these components by changing the color of the specified pixels. It is better to change the whole element's color, anyway. So if you want to change the border color it's better to change the color of the whole border: it will be easier to have a preview of the result.

PTViewer home page