GTK-Themes

Differences between revisions 19 and 20
Revision 19 as of 2009-04-12 11:45:02
Size: 2544
Editor: p50894D21
Comment:
Revision 20 as of 2009-04-12 11:50:10
Size: 2547
Editor: p50894D21
Comment:
Deletions are marked like this. Additions are marked like this.
Line 9: Line 9:
In your ''index.theme'' file put a line like "BackgroundImage=/absolute/path/to/image.png" under the X-GNOME-Metatheme header. For packaged themes wallpapers should be assumed to be placed in ''/usr/share/wallpapers''. In your ''index.theme'' file put a line like {{{"BackgroundImage=/absolute/path/to/image.png"}}} under the X-GNOME-Metatheme header. For packaged themes wallpapers should be assumed to be placed in ''/usr/share/wallpapers''.
Line 17: Line 17:
{{{
style "extra-view-widgets"
{
   # Fx. The special header in Nautilus Search and CD Creator
   bg[NORMAL] = "#CD6127"
}
Line 18: Line 24:
  style "extra-view-widgets"
  {
   # Fx. The special header in Nautilus Search and CD Creator

   bg[NORMAL] = "#CD6127"
  }
  
  
widget "*.nautilus-extra-view-widget" style:highest "extra-view-widgets"
widget "*.nautilus-extra-view-widget" style:highest "extra-view-widgets"
}}}
Line 32: Line 32:
 ''metacity-theme-viewer Human'' {{{metacity-theme-viewer Human}}}

The goal of this page is not to tell you how to design and implement a theme from scratch, but rather to convey some of the trickier and/or less documented parts of theming.

Suggesting a Wallpaper

In your index.theme file put a line like "BackgroundImage=/absolute/path/to/image.png" under the X-GNOME-Metatheme header. For packaged themes wallpapers should be assumed to be placed in /usr/share/wallpapers.

FIXME: Is it possible to set a specific solid color or gradient?

Setting the Background on Nautilus Special Places' Headers

To change the background color of the special headers in Search and CD-Creator put something like the following in your gtkrc:

style "extra-view-widgets"
{
   # Fx. The special header in Nautilus Search and CD Creator
   bg[NORMAL] = "#CD6127"
}

widget "*.nautilus-extra-view-widget" style:highest "extra-view-widgets"

Performance Tuning and Testing of Metacity Themes

To test a Metacity theme run

metacity-theme-viewer Human

to test the Human metacity theme for instance. Your theme should render properly in all the tabs. There's also a Benchmark tab - you can use this to compare rendering speeds with other themes. The fastest ones currently, appears to be Bright, Metabox and ArtworkTeam/SandSkater.

Performance of GTK+ Themes

There is a benchmarking tool for GTK+ themes called GtkPerf.

Pixel Precision

Sometimes it can be hard to tell whether you are missdrawing one pixel or it is just your eyes itching from hours of intense staring at the screen. Try running xmag from the command line and click on the screen area you want to inspect. This gives you a magnification of the area you click on.


CategoryArtwork

Artwork/Documentation/GTK-Themes (last edited 2009-04-12 19:46:03 by p508958A1)