GTK-Themes

Differences between revisions 21 and 22
Revision 21 as of 2009-04-12 12:32:22
Size: 3763
Editor: 78
Comment: Add some more stuff
Revision 22 as of 2009-04-12 12:40:35
Size: 3671
Editor: 78
Comment: adding some more changes to the links
Deletions are marked like this. Additions are marked like this.
Line 27: Line 27:
== Making Main menu with different looks than the other menus == == Making Main Menu with different looks than the other menus ==
Line 80: Line 80:
 * [[http://live.gnome.org/GnomeArt/Tutorials/GtkThemes|Gnome Art Tutorial on GTK]]
Line 81: Line 82:
 * [[http://live.gnome.org/GnomeThemes|Gnome Art Tutorial on Gnome Themes]]
 * [[http://live.gnome.org/GnomeArt/Tutorials/GtkThemes|Gnome Art Tutorial on GTK]]
 * [[http://developer.gnome.org/doc/tutorials/metacity/metacity-themes.html|Gnome Art Tutorial on Metacity]]
 * [[../GtkCssEngine|Information on the GTK-CSS Engine]]
 * [[../GtkCssEngine|Information on the GTK-CSS Engine]] (The future of theming for Gnome)
 * [[http://live.gnome.org/GnomeArt|Gnome Art Homepage]]
 

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"

Making Main Menu with different looks than the other menus

To change the background color or any other property of menuitmes use the following code:

style "mytheme-panelmenu-item"
{
        bg[NORMAL] = "#ffffff"
       
        # add some style options that you want to modify
}
widget "*.gnome-panel-main-menu.*"  style :highest "mytheme-panelmenu-item"

To change the appearance of the menu use this matching:

style "mytheme-panelmenu" = "mytheme-menu" #this is optional inheritance from mytheme-menu
{
        bg[NORMAL] = "#F5F5F5"
        bg_pixmap[NORMAL] = "some image file"
        
}
widget "*.gnome-panel-main-menu" style :highest "mytheme-panelmenu"

In the above we suggested the existence of a theme called 'mytheme' but you could name these as you wish.

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.

Another option would be to use the Enhanced Desktop Zoom plug-in that comes with Compiz-Fusion (if your PC is capable of running advanced effects with compiz, of course). You should remove the check from Filter Linear checkbox in the Animation tab of the plugin's preferences in order to see the individual pixels. Zooming is usually done with pressing Super key and scrolling the mouse.


CategoryArtwork

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