Get Firefox

DaFT Themes

There is currently 1 theme available. It can be downloaded from the DaFT project page at Sourceforge.net from here. DaFT has several themes built in already.


Installation

The theme zip file dows not need to be unzipped. DaFT will take care of it's installation. All you need to do is:

  1. Select the zip file from the DaFT's file browser in the Themes tab on the Change Settings window. (See figure right).
  2. When the zip file is selected, click on the Add Theme button. The theme will be copied to DaFT's themes directory, and added to it's list of themes.
  3. To activate the theme, select it from the list and click on Apply.

Creating themes

Creating a Theme for DaFT is a bit like creating a web page: You have to create or change the GIF images, and define some colors. But there is a difference: DaFT is not written html but in Tcl/Tk. So the widgets (frames, buttons, checkboxes, scrollbars, etc) are created by the Tk toolkit engine. Since DaFT version 1.3.0 most (yes, not all of them :( ) are created with the Tile Tk styling engine (see http://tktable.sourceforge.net/ and http://tktable.sourceforge.net/tile/doc/index.html for documentation on tile). 

DaFT comes with a set of built-in themes, but it can be extended with "custom" themes. A theme file tells the the tile engine how the tile widgets must look in normal mode, pressed mode, or when the widget is activated, or just what the background and forground colors must be, and which font and size the texts must have.  

A custom theme for DaFT is basically a tcl/tk package.  In order to be easily distributed and mounted by the tclkit engine, all files must be packaged in a zip file. If we regard the zip file as a directory, the root of the directory must contain a file with the name pkgIndex.tcl. This file tells the the tclkit engine what the name of the package is, and what to do with it. The name of the package is also the name of the theme. Therefore the package should be named something like: tile::theme::mythemename . The version number behind it is not used at the moment. 

Example of pkgIndex.tcl:
# Package index for Mytheme example

if {[file isdirectory [file join $dir mytheme]]} {
package ifneeded tile::theme::mytheme 1.0 \
[list source [file join $dir mytheme.tcl]]
}
This package index file defines a tile theme mytheme 1.0, and refers to the mytheme.tcl fle, which must in this case be located in the same directory, which is the mytheme.zip file. This file will define all colors and shapes of the tile widgets for Mytheme.  Note: the zip extension is dropped, as the zip file is a virtual directory to the tclkit engine.

So what's in the mytheme.tcl file? Just more tcl code... The code must refer to the Tile package commands and variables. the file mytheme.tcl could look like this.

In the tcl file the images directory is set with statement:

    set imgdir [file join [file dirname [info script]] mytheme]

So we need a subdirectory called mytheme where we put all the images. The images must all be in GIF format, because this is the only format tclkit understands without loading the Img package.  Tip: You could include it in your theme, see also the graphical examples given in the Tile demo kit.

An example of the images used in the ITFT theme:

normal hover/ active pressed
Button button button-h button-p
Checkbox unchecked check-nu check-hu
Checkbox checked check-nc check-hc
Radio button Off radio-nu radio-hu
Radio button On radio-nc radio-hc
Tab tab tab hovered tab selected
Scrollbar vertical vertical scrollbar
vertical scrollbar pressed
Scrollbar horizontal scrollbar scrollbar pressed
Arrow down arrowdown arrowdown-h arrowdown-p
Arrow up arrowup arrowup-h arrowup
Arrow left arrowleft arrowleft-h arrowleft-p
Arrow Right arrowright arrowright-h arrowright-p
Slider vertical
(not used in DaFT)
vertical slider (not used in DaFT) vertical slider pressed (not used in DaFT)
Slider horizontal
(not used in DaFT)
slider (not used in DaFT) slider-p (not used in DaF)

 

SourceForge.net Logo

 

Latest Themes:

SMOG

Added: 18-AUG-2005Smog theme example

Download
Example of a theme for DaFT 1.3+

ITFT-1

Added: 31-MAY-2005Screenshot of the ITFT1 theme for DaFT 1.3.0
Example of a theme for DaFT 1.3.X