Theming in Tracker.NewFS - A tutorial for theme designers
Tracker theming is a new feature and requires at least Tracker.NewFS Beta 7 installed on BeOS R5 or up.
1. Why theming?
Theming in BeOS has long been possible by using different icons for the STD_ICON attributes. But this approch is limited to 16x16 & 32x32 icons and 8bit.
The new theming engine allows for SVG and raster themes (like PNG), with icons up to 512x512 and 32bit colors (including alpha channel). Raster and SVG icons can be combined to provide tuned icons for specific resolutions. Also there is a way to switch between different iconsets easily (including tracker own icons and MIME-Types).
However, themes are an optional feature and need to be enabled first. So there is no need to worry if you dislike theming.
2. Naming convention
All files in the theming structure described below are in lower case and have no file extension. This is true for mimetype icons ("application/x-vnd.be-directory" instead of "application/x-vnd.Be-directory") and for the images themselfs ("trash" instead of "trash.png" or "trash.svg").
3. Location & Infofile
All themes are located in the "Themes" folder under the tracker settings directory, where every theme has it's own folder.
Directly in the theme-root an infofile called "info" can be provided. This file can have 4 strings that are used to display additional information about the theme in the corresponding tracker setting.
The format is as follows:
The LinkLabel is optional. If it is provided this label is displayed instead of the link, if not the link is shown directly.
- Author "<name of the author / designer of the iconset>"
- Comment "<a comment about the theme>"
- Link "<the target of a hyperlink to additional infos about the theme>"
- LinkLabel "<a label for the link>"
Note that a bookmark will be created to open the link. It will be opend using the default handler for bookmarks, which is NetPositive by default. You should therefore link to something that can be properly displayed by NetPositive.
SVG icons are all in the "svg" folder, raster icons are put into subfolders based on their resolution.
Examples: <theme-root>/svg/*, <theme-root>/128/*, <theme-root>/16/*
In these folders, a subfolder structure for mimetypes and tracker own icons can be provided. Mimetype icons are located in the same way as in the beos_mime database.
Examples: <theme-root>/svg/text/plain, <theme-root>/128/image/png
To make it easier, supertype icons like the one for "image/*" are placed in "supertype" files in the corresponding folder.
Example: <theme-root>/svg/image/supertype would be the icon for "image/*"
If you want to use the same icon for more than one type/resource you can use symlinks. You can link "application/pdf" to "application/x-pdf" for example. Relative links should be used so they don't break when the theme-root is renamed.
Tracker own icons are in the "tracker" folder. Possible icons are:
- "tracker/file" - Fallback icon, used when no mime is set
- "tracker/disks" - The disks icon
- "tracker/share" - Icon for shared volumes
- "tracker/harddisk" - Overwritten by "application/x-vnd.be-volume"
- "tracker/printer" - Overwritten by "application/x-vnd.be-printer"
- "tracker/spoolfile" - Overwritten by "application/x-vnd.be-printer-spool"
- "tracker/application" - Overwritten by "application/x-vnd.be-elfexecutable"
- "tracker/folder" - Overwritten by "application/x-vnd.be-directory"
- "tracker/query" - Overwritten by "application/x-vnd.be-query"
- "tracker/querytemplate" - Overwritten by "application/x-vnd.be-querytemplate"
- "tracker/bookmark" - Overwritten by "application/x-vnd.be-bookmark"
- "tracker/person" - Overwritten by "application/x-person"
- "tracker/broken-link" - Overwritten by "application/x-vnd.be-symlink"
Icons for folders:
- "tracker/boot" - Icon for /boot disk
- "tracker/desktop" - Icon for /boot/home/Desktop
- "tracker/dir_home" - Icon for /boot/home
- "tracker/dir_beos" - Icon for /boot/beos
- "tracker/dir_fonts" - Icon for /boot/beos/etc/fonts and /boot/home/config/fonts
- "tracker/dir_apps" - Icon for /boot/apps and /boot/beos/apps
- "tracker/dir_prefs" - Icon for /boot/preferences
- "tracker/dir_mail" - Icon for /boot/home/mail
- "tracker/dir_query" - Icon for /boot/home/queries
- "tracker/dir_develop" - Icon for /boot/develop
- "tracker/dir_download" - Icon for /boot/home/Downloads
- "tracker/dir_people" - Icon for /boot/home/people
- "tracker/dir_config" - Icon for /boot/home/config
5. Tuned Icons
If you make a SVG iconset you may want to provide tuned raster icons that look good at low resolutions. To do this you simply provide the icon under */svg/* and */<iconsize>/*.
Raster icons are rendered using translators. This makes it possible to have them in any format a translator is installed for, but for performance reasons PNG is recommended. Note also that a crashing translator may bring down the whole tracker, therefore you shouldn't relay on a format you know there is a problematic translator out there (some versions of GIFTranslator for example).