How do I customize Cardapio's colors or theme?

Created by Thiago Teixeira
Keywords:
Last updated by:
Thiago Teixeira

Although there is no dedicated graphical interface to modify Cardapio's theme, it is certainly possible to customize Cardapio using Gtk's standard themeing facilities.

See for instance: http://www.flickr.com/photos/56377980@N02/5555863052/

(The code for this theme is given at
http://bazaar.launchpad.net/~cardapio-team/cardapio/cardapio/view/head:/themes/dark-elegant.gtkrc )

    ~

As a simple example, if you want to make Cardapio's text red on a black background, and make the application pane gray with blue text, try adding the lines below to your ~/.gtkrc-2.0 file:

-------- add from here --------

style "cardapio-buttons"
{
 fg[NORMAL] = "#FF0000"
 bg[NORMAL] = "#000000"
}
widget "CardapioWindow*" style "cardapio-buttons"

style "cardapio-app-buttons"
{
 text[NORMAL] = "#00FF00"
 base[NORMAL] = "#888888"
}
widget "ApplicationPane" style "cardapio-app-buttons"

-------- up to here --------

--> Don't forget to restart Cardapio to test the theme!!!

    ~

Another example is the Victory theme by Darin D, which does some special theming for Cardapio:

http://gnome-look.org/content/show.php/Victory+(Strikes+Again)?content=123936

    ~

For more information on how to write your own themes, take a look at the pages below
* http://live.gnome.org/GnomeArt/Tutorials/GtkThemes
* https://wiki.ubuntu.com/Artwork/Documentation/Murrine

In addition, you will probably want to open Cardapio's user interface file in Glade to find out the names of the various Cardapio widgets:
1) First, install glade
  $ sudo apt-get install glade

2) Then open /usr/lib/cardapio/cardapio.ui in Glade through the Glade GUI or by using the Run Application dialog:
  - Press Alt+F2
  - Type
      glade /usr/lib/cardapio/cardapio.ui
  - Press Run

    ~

Another useful tool for browsing the Cardapio UI is Gtk Parasite:
* http://chipx86.github.com/gtkparasite/