diff options
Diffstat (limited to 'gnome2-system-admin-guide/C/themes.xml')
-rw-r--r-- | gnome2-system-admin-guide/C/themes.xml | 236 |
1 files changed, 236 insertions, 0 deletions
diff --git a/gnome2-system-admin-guide/C/themes.xml b/gnome2-system-admin-guide/C/themes.xml new file mode 100644 index 0000000..1384d8d --- /dev/null +++ b/gnome2-system-admin-guide/C/themes.xml @@ -0,0 +1,236 @@ +<?xml version="1.0" encoding="utf-8"?> +<chapter id="themes-0"> + <title>Installing Themes</title> + <highlights> + <para>This chapter describes the types of theme that are available +in the GNOME desktop, how to install themes, and how to create a custom theme.</para> + </highlights> + <sect1 id="themes-1"> + <title>Introduction</title> + <indexterm> + <primary>themes</primary> + <secondary>introduction</secondary> + </indexterm> + <para>A theme is a group of coordinated settings that specifies the visual +appearance of a part of the GNOME desktop. Users can choose themes to change +the appearance of the desktop. </para> + <para>The following types of theme affect different parts of the GNOME desktop:</para> + <variablelist> + <varlistentry> + <term>Desktop themes</term> + <listitem> + <indexterm> + <primary>desktop +themes</primary> + <see>themes</see> + </indexterm> + <para>Desktop themes determine +the visual appearance of windows, panels, and applets. Desktop themes also +determine the visual appearance of the GNOME-compliant interface items that +appear on windows, panels, and applets, such as menus, icons, and buttons. +Some of the desktop themes that are available in GNOME are designed for special +accessibility needs. Users can choose a desktop theme from the <guilabel>Widget Theme</guilabel> tabbed section in the <application>Theme</application> +preference tool.</para> + </listitem> + </varlistentry> + <varlistentry> + <term>Window frame themes</term> + <listitem> + <indexterm> + <primary>window frame themes</primary> + <see>themes</see> + </indexterm> + <para>Window frame +themes determine the appearance of the frames around windows only. Users can +choose a window frame theme from the <guilabel>Window Frames</guilabel> tabbed +section in the <application>Theme</application> preference tool.</para> + </listitem> + </varlistentry> + </variablelist> + </sect1> + <sect1 id="themes-3"> + <title>To Install a Desktop Theme</title> + <indexterm> + <primary>themes</primary> + <secondary>desktop theme, installing</secondary> + </indexterm> + <para>Desktop themes reside in the <filename>/usr/share/themes</filename> directory. The typical structure of a desktop theme in the file +system is as follows:</para> + <informaltable frame="none"> + <tgroup cols="2" colsep="0" rowsep="0"> + <colspec colwidth="19.19*"/> + <colspec colwidth="80.81*"/> + <tbody> + <row> + <entry valign="top"> + <para>Theme file</para> + </entry> + <entry valign="top"> + <para> + <filename>/usr/share/themes/<replaceable>theme_name</replaceable>/gtk-2.0/gtkrc</filename> + </para> + </entry> + </row> + <row> + <entry valign="top"> + <para>Image files</para> + </entry> + <entry valign="top"> + <para> + <filename>/usr/share/themes/<replaceable>theme_name</replaceable>/pixmaps/*.*</filename> + </para> + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + <para>Typically, a new desktop theme is supplied as a <filename>.tar.gz</filename> +file. To install the new desktop theme, unzip the <filename>.tar.gz</filename> +file, then untar the <filename>.tar</filename> file into the <filename>/usr/share/themes</filename> directory.</para> + <para>If a user adds a desktop theme, the theme is stored in the <filename>$HOME/.themes</filename> directory.</para> + <para>Users can install their own desktop themes. If a user installs a desktop +theme, the theme is stored in the <filename>$HOME/.themes</filename> directory.</para> + </sect1> + <sect1 id="themes-5"> + <title>To Install a Window Frame Theme</title> + <indexterm> + <primary>themes</primary> + <secondary>window frame theme, installing</secondary> + </indexterm> + <para>Window frame themes reside in the <filename>/usr/share/themes/<replaceable>theme_name</replaceable>/metacity-1</filename> +directory. The typical structure of a window frame theme in the file system +is as follows:</para> + <informaltable frame="none"> + <tgroup cols="2" colsep="0" rowsep="0"> + <colspec colwidth="19.19*"/> + <colspec colwidth="80.81*"/> + <tbody> + <row> + <entry valign="top"> + <para>Theme file</para> + </entry> + <entry valign="top"> + <para> + <filename>/usr/share/themes/<replaceable>theme_name</replaceable>/metacity-1/metacity-theme-1.xml</filename> + </para> + </entry> + </row> + <row> + <entry valign="top"> + <para>Image files</para> + </entry> + <entry valign="top"> + <para> + <filename>/usr/share/themes/<replaceable>theme_name</replaceable>/metacity-1/*.*</filename> + </para> + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + <para>Typically, a new window frame theme is supplied as a <filename>.tar.gz</filename> file. To install the new window frame theme, unzip the <filename>.tar.gz</filename> file, then untar the <filename>.tar</filename> file into +the <filename>/usr/share/themes</filename> directory.</para> + <para>Users can install their own window frame themes. If a user installs +a window frame theme, the theme is stored in the <filename>$HOME/.themes</filename> +directory.</para> + </sect1> + <sect1 id="themes-11"> + <title>Installing Icons for Themes</title> + <indexterm> + <primary>themes</primary> + <secondary>installing icons</secondary> + </indexterm> + <para>The GNOME desktop provides several themes that are designed +for users with special visual needs. For example, some of the themes are designed +for users with low vision. The themes contain several versions of each icon +so that the icon can be displayed in each theme.</para> + <para>You might need to install a new icon for an application. When you install +a new icon, you must create several versions of the icon, so that the icon +displays correctly in the themes. You can create the icons in several formats, +for example Portable Network Graphic (PNG) format. The suggested size of icons +for the GNOME desktop is 48 pixels by 48 pixels. At this size, most themes +can rescale the icons.</para> + <para>When you install a new icon, create the following 48 × 48 pixel +versions of the icon:</para> + <itemizedlist> + <listitem> + <para>Regular icon</para> + </listitem> + <listitem> + <para>Low contrast icon</para> + </listitem> + <listitem> + <para>High contrast icon</para> + </listitem> + <listitem> + <para>Inverse high contrast icon</para> + </listitem> + </itemizedlist> + <para>If possible, create 16 × 16 pixel versions of the each of the +icons above also, for themes that do not require large print.</para> + <para>Install the icons to the image files location that is specified for +the theme in <xref linkend="themes-3"/> or <xref linkend="themes-5"/>. For example, +to add icons to the HighContrast theme, add the icons to the <filename>/usr/share/themes/HighContrast/pixmaps</filename> directory. Add references to the icons to the relevant theme files. +For example, to add icons to the HighContrast theme, add references to the +icons to the <filename>/usr/share/themes/HighContrast/gtk-2.0/gtkrc</filename> +file. </para> + <para>The instructions above apply only to the following types of icon:</para> + <itemizedlist> + <listitem> + <para>Icons that are used within applications in the GNOME desktop.</para> + </listitem> + <listitem> + <para>Icons that are used internally by GTK+ applications, or GTK+ +stock icons.</para> + </listitem> + </itemizedlist> + <para>For more information on how to create icons for application launchers +and for panels, see <ulink url="http://www.freedesktop.org/standards/icon-theme-spec.html">http://www.freedesktop.org/standards/icon-theme-spec.html</ulink>.</para> + </sect1> + <sect1 id="themes-15"> + <title>To Create a Custom Desktop Theme</title> + <indexterm> + <primary>themes</primary> + <secondary>creating custom desktop</secondary> + </indexterm> + <para>If the desktop themes that the GNOME desktop provides are +not suitable for the needs of your users, you can create a custom desktop +theme. To create a custom desktop theme, perform the following steps:</para> + <orderedlist> + <listitem> + <para>Create a directory structure for the theme in the <filename>/usr/share/themes</filename> directory. Use the same directory structure that +other themes use. For example, to create a theme that is called SmallPrint, +create the following directories:</para> + <itemizedlist> + <listitem> + <para> + <filename>/usr/share/themes/SmallPrint/gtk-2.0</filename> + </para> + </listitem> + <listitem> + <para> + <filename>/usr/share/themes/SmallPrint/pixmaps</filename> + </para> + </listitem> + </itemizedlist> + </listitem> + <listitem> + <para>Locate the <filename>gtkrc</filename> theme file that is closest +to meeting the needs of your users. Copy the file to the <filename>gtk-2.0</filename> directory of your new theme.</para> + </listitem> + <listitem> + <para>Open the <filename>gtkrc</filename> file in a text editor, + and modify the attributes of the interface elements as required. </para> + </listitem> + <listitem> + <para>If the new theme includes images, install the images for the +new theme in the <filename>pixmaps</filename> directory of your new theme. +If the new theme uses images from another theme, you do not need to create +copies of the images for the new theme. Instead, ensure that the reference +to the images in the <literal>pixmap_path</literal> entry in the <filename>gtkrc</filename> file is correct.</para> + </listitem> + </orderedlist> + <para>Users can now choose the new theme.</para> + <para>For more information on <filename>gtkrc</filename> files, see <ulink url="http://developer.gnome.org/doc/API/2.0/gtk/index.html">http://developer.gnome.org/doc/API/2.0/gtk/index.html</ulink>.</para> + </sect1> +</chapter> |