Documentation‎ > ‎Concepts‎ > ‎

    Resource Files

    Even though the Gnome theme engine creates some good looking interfaces by default based upon the current system theme settings, its still possible to override default values in a way not usually recommended. This is achieved using customized resource files.

    When Gtk is first initialised by the Gnocl package, the files looked for will be <SYSCONFDIR>/gtk-2.0/gtkrc and .gtkrc-2.0 in the users home directory.

    Whilst the implementation of the loading of resource files is minimal at the present time, this mechanism allows a high level of introspection.  The following is an example of a simple customized resource file employed in the gnocl demo script, test_resourceFile.tcl.

    First the before and after screen shots.

     
     

    And the resource file that made the difference.

    style "entry"
    {
    fg[ACTIVE] = "#FF0000"
    fg[SELECTED] = "#003366"
    fg[NORMAL] = "#CCCCCC"
    fg[PRELIGHT] = "#FFFFFF"
    fg[INSENSITIVE] = "#999999"
    text[NORMAL] = { 0, 65536, 0}
    base[NORMAL] = { 65536, 65536, 0}

    bg[ACTIVE] = "#003366"
    bg[SELECTED] = "#FF0000"
    bg[NORMAL] = "#666666"
    bg[PRELIGHT] = "#003366"
    bg[INSENSITIVE] = "#666666"

    font_name = "Sans Bold 14"
    }


    class "GtkEntry" style "entry"

    The Gtk+ online documentation provided more on the construction of resource files.

    Comments

    Sections