1 <chapter id="kdm-themes">
2 <title>Creating themes for the &kdm; greeter</title>
5 This section describes the creation of themes for the themed
6 greeter. For examples including screenshots, see the installed
7 standard themes and the themes from
8 <ulink type="http" url="http://www.kde-look.org/index.php?xcontentmode=40">
9 the theme website</ulink>.
12 <sect1 id="theme-overview">
13 <title>Theme Overview</title>
16 &kdm; themes can be created by creating an XML file that follows the
18 <filename>$<envar>KDEDIR</envar>/share/apps/doc/kdm/greeter.dtd</filename>.
19 Theme files are stored in the directory
20 <filename class="directory">$<envar>KDEDIR</envar>/share/apps/kdm/themes/<replaceable>theme_name</replaceable></filename>.
21 The theme directory should contain a file called
22 <filename>KdmGreeterTheme.desktop</filename> which has similar format
23 to other <filename class="extension">.desktop</filename> files and looks
30 Description=Theme with blue circles
31 Author=Bond, James Bond
32 Copyright=(c) 2002 Bond, James Bond
33 Screenshot=screenshot.png
38 The <literal>Name</literal>, <literal>Description</literal>,
39 <literal>Author</literal> and <literal>Copyright</literal> fields can
40 be translated just like in other
41 <filename class="extension">.desktop</filename> files. All the files
42 that are mentioned should be in the theme directory itself. The
43 <literal>Screenshot</literal> field points to a file which should be a
44 200x150 screenshot of the theme in action (it is OK not to have one,
45 but it makes it nicer for the user). The <literal>Greeter</literal>
46 entry points to an XML file that contains the description of the theme.
51 Once a theme is installed, it can be tested with the
52 <command>gdmthemetester</command> program. This program assumes that
53 the X server supports a nested server command. This command takes two
54 arguments, first the environment that should be used. The environment
55 can be one of the following values: console, console-timed, flexi,
56 remote-flexi, or xdmcp. The "console" option tests the
57 theme as it would be shown on an attached display. The
58 "console-timed" option tests the theme as it would be shown
59 on an attached display with timed login enabled. The "flexi"
60 option tests the theme as it would be shown on an attached flexible
61 display (such as started via Xnest). Finally, the "xdmcp"
62 option tests the theme as it would be shown for remote XDMCP
63 displays. The second argument is the theme name. For example, to
64 test how the circles theme would look in XDMP remote display mode,
65 you would run the following command:
69 <command>gdmthemetester</command> <arg>xdmcp</arg> <arg><replaceable>circles</replaceable></arg>
73 When developing a theme, make sure to test all the environments, and
74 make sure to test how the caps lock warning looks by pressing the caps
75 lock key. Running <command>gdmthemetester</command> is also a good way
76 to take screenshots of &kdm; themes. Simply take a screenshot of the
77 theme running in the nested display window. This can be done in GNOME
78 by focusing the nested login window and pressing Alt-PrintScreen.
83 Once a theme has been fully tested, make a tarball that contains
84 the directory as it would be installed to the
85 <filename class="directory">$<envar>KDEDIR</envar>/share/apps/kdm/themes</filename>
86 directory. This is the standard format for distributing &kdm; themes.
90 <sect1 id="theme-format">
91 <title>Detailed Description of Theme XML format</title>
93 <sect2 id="greeter-tag">
94 <title>Toplevel Node</title>
97 &kdm; themes are XML files with the <greeter> tag at their root.
98 The toplevel node is an <link linkend="item-nodes">item node</link>
99 of type <literal>rect</literal> with an implicit
100 <link linkend="fixed-nodes">fixed layout</link>.
105 You may specify a Qt GUI style to
106 be used with this theme by using the gui-style attribute in the
107 greeter tag as in the following example.
108 gui-style="Plastique"
113 <?xml version="1.0" encoding="UTF-8"?>
114 <!DOCTYPE greeter SYSTEM "greeter.dtd">
121 Contained within the greeter tag can be the nodes described
122 in the next sections of this document. Some of these nodes are
123 containers (layout nodes, item nodes) which can contain other
128 <sect2 id="item-nodes">
129 <title>Item Nodes</title>
132 A &kdm; theme is created by specifying a hierarchy of item and layout
133 nodes. Item nodes can have the following value for the
134 <literal>type</literal> attribute:
143 A button field. This field uses a Qt button.
146 It is also possible to make any other item act like a button
147 by setting its <literal>button</literal> attribute to
148 <literal>true</literal>. However, it is better to use
149 Qt buttons in &kdm; themes since these are accessible to
150 users with disabilities.
158 <para>An input widget like a line edit or combo box.
159 Note that this is merely a placeholder for Qt widgets.</para>
167 A text label. Must contain either a
168 <link linkend="text-nodes"><literal>text</literal> node</link>
170 <link linkend="stock-nodes"><literal>stock</literal> node</link>
179 <para>A face browser widget.</para>
186 <para>A raster image in a format that Qt supports, ⪚
187 PNG, JPEG, Tiff, etc.</para>
194 <para>A plain rectangle.</para>
201 <para>A vector image in SVG format.</para>
209 <item type="label">
212 An item that acts as a button:
214 <item type="rect" id="disconnect_button" button="true">.
219 By default, the &kdm; login screen will disappear after authentication.
220 This can result in flicker between the login screen and the session.
221 The <literal>background</literal> attribute allows users to specify
222 what elements of the theme are the background image. When used, this
223 will cause &kdm; to remove all non-background items from the display
224 and render the remaining <literal>background</literal> items to the root
225 window. This can be used to create a smooth transition between the
226 login screen and the session:
229 <item type="rect" background="true">
230 <normal file="background.svg"/>
231 <pos x="0" y="0" width="100%" height="-75"/>
235 To use a different background for login transition than the one
236 used for login, the theme should specify two item nodes (which
237 could contain pixmaps or svg images, for example). The item
238 which corresponds to the greeter background should not have the
239 <literal>background</literal> property while the item which corresponds
240 to the transition background should have the
241 <literal>background</literal> property. For instance :
244 <?xml version="1.0" encoding="UTF-8"?>
245 <!DOCTYPE greeter SYSTEM "greeter.dtd">
247 <item type="rect" background="true">
248 <normal file="background_for_login.svg" element="background"/>
249 <pos x="0" y="0" width="100%" height="100%"/>
251 <item type="rect">
252 <normal file="background_for_greeter.svg"/>
253 <pos x="0" y="0" width="100%" height="100%"/>
262 In multi-screen setups, themes may also specify the look of other
263 screens than the one the greeter is on - but typically only background
264 items will appear there. To specify which screen(s) an item should
265 appear on, the <literal>screen</literal> attribute can be used with the
266 value being one of <literal>greeter</literal>, <literal>other</literal>
267 or <literal>all</literal>, meaning the screen the greeter is on, all
268 screens the greeter is not on and all screens, resp.
273 Each item can be given a name via the <literal>id</literal>
274 attribute. Certain ids are recognized by &kdm; to give those
275 items a special function:
280 <term><literal>list</literal> items</term>
284 List items by default display as lists, but the
285 <literal>combo="true"</literal> attribute can be used
286 to specify combo box style (combo style supported since &kde; ).
287 Some predefined lists may be included in a theme by using the
288 following id values. Customized lists may also be defined,
289 which are explained below.
293 <?dbhtml list-presentation="table"?>
294 <segtitle>Id</segtitle><segtitle>Function</segtitle>
298 <seg>A list of available sessions, which allows the user to
299 pick the session to use. Supported since &kde; .</seg>
304 <seg>A list of available languages, which allows the user to
305 pick the language to use. Supported since &kde; .</seg>
314 <term><literal>button</literal> items and items with the
315 <literal>button="true"</literal> attribute.</term>
319 Buttons typically trigger certain actions.
320 Addionally, &kdm; will hide buttons whose actions are
321 not available for some reason.
325 <?dbhtml list-presentation="table"?>
326 <segtitle>Id</segtitle><segtitle>Action</segtitle>
329 <seg>chooser_button</seg>
330 <seg>Runs the XDMCP chooser.</seg>
335 <seg>custom_cmd_button[0-9]</seg>
336 <seg>Runs the <filename>n-th</filename> custom command.</seg>
341 <seg>disconnect_button</seg>
342 <seg>Disconnect from remote session.</seg>
347 <seg>language_button</seg>
348 <seg>Open the language selection menu.</seg>
354 <seg>halt_button</seg>
355 <seg>Power off the system.</seg>
359 <seg>reboot_button</seg>
360 <seg>Restart the system.</seg>
364 <seg>suspend_button</seg>
365 <seg>Suspend the system.</seg>
370 <seg>session_button</seg>
371 <seg>Open the session type selection menu.</seg>
375 <seg>system_button</seg>
376 <seg>Open a catch-all menu with various options and actions,
377 depending on the configuration.</seg>
384 <term><literal>label</literal> items</term>
388 &kdm; will show/hide these labels and set their text depending
389 on the state of the login dialog.
393 <?dbhtml list-presentation="table"?>
394 <segtitle>Id</segtitle><segtitle>Function</segtitle>
398 <seg>pam-prompt</seg>
399 <seg>Label that displays the <acronym>PAM</acronym> prompt.
400 This is the prompt that <acronym>PAM</acronym>
401 uses to ask for username, password, etc.</seg>
405 <seg>pam-message</seg>
406 <seg>Label that displays the <acronym>PAM</acronym> message.
407 These are messages that <acronym>PAM</acronym>/&kdm; gives
408 about state of the account, help about the prompts and other
415 <seg>This displays the <guilabel>Login failed.</guilabel>
424 <term>Widget embedding items</term>
428 &kdm; will embed particular Qt widgets into these items.
432 <?dbhtml list-presentation="table"?>
433 <segtitle>Id</segtitle><segtitle>Function</segtitle>
436 <seg>user-entry</seg>
437 <seg>Entry field for username entry.</seg>
442 <seg>Entry field for password entry.</seg>
446 <seg>domain-entry</seg>
447 <seg>Some <quote>conversation</quote> plugins use this field
448 to query a domain name. If this field is present, the related
449 enclosing items should have
450 <link linkend="show-nodes">show nodes</link> with the type
451 <literal>plugin-domain-entry</literal>.</seg>
456 <seg>This item should be of type <literal>rect</literal>.
457 It represents the <quote>hot</quote> area of the
458 greeter: it contains the <literal>label</literal> and
459 <literal>entry</literal> items which concern the
460 authentication process. If a given
461 <quote>conversation</quote> plugin cannot match the
462 existing items with its needs, it tries to embed a complex
463 widget with an own layout into this item, thus completely
464 overriding the theme's <quote>talker</quote>.
465 Strictily speaking, &kdm; themes do not need to provide
466 own <quote>talker</quote> designs at all, as all &kdm;
467 authentication plugins are able make use of the
468 <literal>talker</literal> item.
474 <seg>This item must be of type <literal>list</literal>.
475 If the user list feature is enabled, &kdm; will embed
476 the user list widget here. Otherwise, this item is
482 <seg>This item should be of type <literal>rect</literal>.
483 If the built-in <command>xconsole</command> feature is
484 compiled in and enabled, &kdm; will embed
485 the console log widget here. Otherwise, this item is
494 <term>Other items</term>
498 &kdm; will show/hide these items depending on the configuration
499 and the current state of the greeter. &kdm; does not impose
500 type requirements on them, but they usually lend themselves
501 to a particular type.
505 <?dbhtml list-presentation="table"?>
506 <segtitle>Id</segtitle><segtitle>Shown only when ...</segtitle>
509 <seg>timed-label</seg>
510 <seg>... timed login is in progress.</seg>
514 <seg>caps-lock-warning</seg>
515 <seg>... Caps Lock is active.</seg>
519 <seg>xauth-warning</seg>
520 <seg>... the &X-Server; requires no X authorization to
526 <seg>pam-error-logo</seg>
527 <seg>... a pam-error message is being displayed.
528 This is useful for displaying an <guiicon>Attention</guiicon>
529 icon, for example.</seg>
534 <seg>userlist-rect</seg>
535 <seg>... the user list is enabled. By nesting the
536 <literal>userlist</literal> item into this one, it is possible
537 to create something like a frame around the list and have
538 it shown only when the user list itself if shown.</seg>
542 <seg>xconsole-rect</seg>
543 <seg>... the built-in <command>xconsole</command> is enabled.
544 Analogous to <literal>userlist-rect</literal>.</seg>
555 <sect2 id="layout-nodes">
556 <title>Layout Container Nodes</title>
559 Layout nodes appear inside item nodes and contain item nodes again.
560 The type of the layout node determines the arrangement of its
561 child nodes. An item node can contain one layout node of each type.
564 <sect3 id="box-nodes">
565 <title>Box Nodes</title>
568 Box nodes automatically arrange their children in a row.
569 They are specified as follows:
571 <box orientation="<replaceable>alignment</replaceable>" min-width="<replaceable>num</replaceable>" min-height="<replaceable>num</replaceable>"
572 xpadding="<replaceable>num</replaceable>" ypadding="<replaceable>num</replaceable>" spacing="<replaceable>num</replaceable>"
573 homogeneous="<replaceable>bool</replaceable>">
575 Where <replaceable>num</replaceable> means number of pixels and
576 <replaceable>bool</replaceable> means either <literal>true</literal>
577 or <literal>false</literal>.
578 The <replaceable>alignment</replaceable> value can be either
579 <literal>horizontal</literal> or <literal>vertical</literal>.
580 If you leave any attribute off, it will default to zero for numbers,
581 <literal>false</literal> for bools and <literal>vertical</literal>
586 The spacing is the distance between neighboring child items.
587 The padding is the box' outer margin.
588 If the box is homogeneous, the same amount of space is allocated
593 <sect3 id="fixed-nodes">
594 <title>Fixed Nodes</title>
597 Fixed is a container that has its children
598 laid out at precise coordinates. The size of this container
599 is the smallest rectangle that contains all the children. Fixed
600 has no extra attributes and so you just use:
604 Then you put other items with proper position nodes inside it.
610 <sect2 id="position-nodes">
611 <title>Position Nodes</title>
614 Each item can specify its position and size via the <literal>pos</literal>
617 <pos x="0" y="4" width="100%" height="100%"/>
622 If the size is not specified, it will be the item's
623 <quote>natural</quote> size, called the size hint.
624 Note that not all items have a useful size hint.
628 Both position and size can be given in percent and will be calculated
629 relative to the size of the enclosing container in this case.
630 For toplevel items it is the percentage of the whole screen.
631 By appending circumflexes (<literal>^</literal>) to the size
632 specification it is possible to modify it to be relative to the
633 size of the enclosing item's enclosing item and so on.
637 If the item contains a box, <literal>width</literal> and
638 <literal>height</literal> can be specified to be
639 <literal>box</literal> to mean that they are supposed to be the width
640 and height of the box, that is the items in the box plus the padding.
644 One of <literal>width</literal> and <literal>height</literal> can
645 be specified to be <literal>scale</literal>
646 to mean that it should be scaled according to the other dimension's
647 scale relative to its size hint. Use this to preserve the aspect
648 ratio of scaled images automatically.
652 If the <literal>expand</literal> attribute is specified and
653 <literal>true</literal>, this item will be expanded in the
654 enclosing box as much as possible (that is it will be given
655 more space if available).
659 If <literal>width</literal> or <literal>height</literal> is a
660 plain number, a negative value represents
661 an offset from the enclosing container's size. Note that it is
662 possible to specify a positive offset by writing two minus signs.
666 In either case it is possible to constrain the final size with the
667 <literal>min-width</literal>, <literal>min-height</literal>,
668 <literal>max-width</literal> and <literal>max-height</literal>
669 attributes which can be specified in the same ways as
670 <literal>width</literal> and <literal>height</literal>.
674 If <literal>x</literal> or <literal>y</literal> is a plain number,
675 a negative value represents an offset from the right resp. bottom edge,
676 unlike the default which is the left resp. top edge.
680 It is also possible to specify which point within the item the
681 position refers to. This is called the anchor and can be
682 either <literal>c</literal> for center or one of
683 <literal>n</literal>, <literal>ne</literal>, <literal>e</literal>,
684 <literal>se</literal>, <literal>s</literal>, <literal>sw</literal>,
685 <literal>w</literal> and <literal>nw</literal>
686 which stand for the different edges/corners corresponding the
687 directions on a topographical map.
688 The default is <literal>nw</literal>, which is the upper left corner.
691 <pos x="10%" y="50%" anchor="w" width="80%" height="95"/>
697 <sect2 id="show-nodes">
698 <title>Show Nodes</title>
700 <!-- not really implemented
702 Some items may only display in certain modes, like when doing a
703 remote display. Multiple values can be specified and must be
704 separated with commas. The following values are possible:
708 <filename>console</filename> - In console mode.
711 <filename>console-fixed</filename> - In console non-flexi mode.
714 <filename>console-flexi</filename> - In console & flexi mode.
717 <filename>flexi</filename> - In flexi mode.
720 <filename>remote</filename> - In remote mode.
723 <filename>remote-flexi</filename> - In remote & flexi mode.
729 <show modes="flexi,remote"/>
735 You can specify the <literal>type</literal> attribute to indicate that
736 certain items should only be displayed if the type is set.
737 Prefixing the type with an exclamation mark (<literal>!</literal>)
738 reverses the condition.
739 Valid values include the following:
742 <?dbhtml list-presentation="table"?>
743 <segtitle>Type</segtitle><segtitle>Display if ...</segtitle>
746 <seg><literal>chooser</literal></seg>
747 <seg>switching to remote login is permitted.</seg>
752 <seg><literal>custom_cmd[0-9]</literal></seg>
753 <seg><literal>n-th</literal> CustomCommand is specified in
754 the &kdm; configuration.</seg>
759 <seg><literal>halt</literal> and <literal>reboot</literal></seg>
760 <seg>system shutdown is permitted.</seg>
765 <seg><literal>suspend</literal></seg>
766 <seg>suspending the system is permitted.</seg>
771 <seg><literal>system</literal></seg>
772 <seg>no condition (always set in &kdm;).</seg>
777 <seg><literal>timed</literal></seg>
778 <seg>a timed login is being counted down.</seg>
783 <seg><literal>plugin-</literal><replaceable>entry-name</replaceable></seg>
784 <seg>the <quote>conversation</quote> plugin provides a
785 corresponding input field.</seg>
794 <show type="chooser"/>
799 Alternatively, you can specify a <literal>min-screen-width</literal> or
800 <literal>min-screen-height</literal> value to indicate that certain
801 items should be displayed only if the screen resolution is the
802 at least the specified size.
805 <show min-screen-height="768"/>
811 <sect2 id="nor-act-pre-nodes">
812 <title>Normal/Active/Prelight Nodes</title>
815 The look of most item types can be parametrized via the following
821 <term><literal>normal</literal></term>
823 <para>Normal state.</para>
827 <term><literal>prelight</literal></term>
829 <para>When the mouse is hovering over the item.</para>
833 <term><literal>active</literal></term>
835 <para>When a mouse button is clicked on the item.</para>
843 The exact set of available attributes depends on the item type:
847 <term><literal>rect</literal></term>
851 <normal color="#000000" alpha="0.0"/>
853 Either of the attributes may be omitted, in which case the
854 default is used (the example represents the defaults).
855 <literal>alpha</literal> is a floating point number between
856 zero (transparent) and one (opaque).
857 <literal>color</literal> is a hashmark followed by a six-digit
858 hex number; the format is
859 <quote><literal>#</literal><replaceable>rrggbb</replaceable></quote>.
860 Alternatively, <literal>color</literal> may be specified as an
861 eight-digit hex number, in which case the first two digits are
868 <term><literal>label</literal></term>
872 <normal color="#ffffff" alpha="1.0" font="Sans 14"/>
874 <literal>alpha</literal> and <literal>color</literal> are
875 specified like in <quote>rect</quote> items.
878 <literal>font</literal> follows the format
879 <quote><replaceable>family-list</replaceable> <replaceable>style-options</replaceable> <replaceable>size</replaceable></quote>.
880 Each part is optional.
883 <replaceable>family-list</replaceable> is a comma-separated
884 list of font families like <quote>helvetica</quote>,
885 <quote>monospace</quote>, etc.
888 <replaceable>style-options</replaceable> is a space-delimited
889 list of keywords from the categories style, weight and stretch;
890 from each category at most one.
891 The style can be <literal>normal</literal>,
892 <literal>italic</literal> or <literal>oblique</literal>.
893 Weight can be <literal>ultra-light</literal>,
894 <literal>light</literal>, <literal>medium</literal>,
895 <literal>semi-bold</literal>, <literal>bold</literal>,
896 <literal>ultra-bold</literal> or <literal>heavy</literal>.
897 Allowable stretches comprise <literal>ultra-condensed</literal>,
898 <literal>extra-condensed</literal>, <literal>condensed</literal>,
899 <literal>semi-condensed</literal>, <literal>normal</literal>,
900 <literal>semi-expanded</literal>, <literal>expanded</literal>,
901 <literal>extra-expanded</literal> and <literal>ultra-expanded</literal>.
904 <replaceable>size</replaceable> is either a floating point
905 number representing the size in points (1/72 inch) or an
906 integer followed by <literal>px</literal> representing the
907 size in pixels. Point sizes are preferable, as they are
908 independent from the display resolution.
911 If either attribute is left out, the values from the
912 <link linkend="style-nodes">style node</link> are used.
913 If this yields no window-text color specification, white
914 is used. The default font is the one configured in &kdmrc;.
920 <term><literal>pixmap</literal></term>
921 <term><literal>svg</literal></term>
925 <normal file="picture.png" tint="#dddddd" alpha="1.0"/>
930 <literal>file</literal> specifies the file containing the image.
931 Relative pathnames are relative to the theme's directory.
935 <literal>element</literal> specifies the element id of a SVG file.
936 If empty, the whole SVG image will be rendered.
940 For <literal>pixmap</literal> nodes, &kdm; first tries to open
941 a file that matches <replaceable>basename</replaceable><literal>-</literal><replaceable>width</replaceable><literal>x</literal><replaceable>height</replaceable><literal>.</literal><replaceable>extension</replaceable>
942 based on the specified file name, so the best-quality image
943 for a given resolution can be used.
948 Note that an alternative image file can be specified using the
949 <literal>altfile</literal><optional><replaceable>n</replaceable></optional>
950 attribute. &kdm; will use the last valid image filename
951 specified. For example:
953 <normal file="picture.png" altfile1="distribution-blah-image.png" altfile2="distribution-foo-image.png"/>
955 If <filename>distribution-foo-image.png</filename> is a valid
956 image filename it will be used.
957 Otherwise distribution-blah-image.png will be used if valid.
958 This feature is supported since &kde; .
963 <literal>tint</literal> and <literal>alpha</literal> form a
964 color specification like in <literal>rect</literal> items.
965 Each pixel of the image is multiplied with this color
975 <sect2 id="style-nodes">
976 <title>Widget Style Nodes</title>
979 This tag makes it possible to change the appearance of labels and
980 Qt widgets embedded into the theme, e.g., line edits, buttons or
982 The style settings are inherited by child items, but can be
983 overridden individually. The defaults are taken from &kdmrc;.
987 The <literal>font</literal> attribute defines the font for all widgets.
988 For widgets with an input function it can be overridden with the
989 <literal>edit-font</literal> attribute.
990 Fonts are specified the same way as in
991 <link linkend="nor-act-pre-nodes">normal/active/prelight nodes</link>.
995 Usually, the theming engine tries hard to remove any frames from
996 Qt widgets, so they melt into the theme seamlessly. In cases
997 where this is not desired, the <literal>frame</literal> attribute can
998 be set to <literal>true</literal>.
1002 It is possible to specify almost the entire palette for the widgets
1004 <ulink type="http" url="http://doc.trolltech.com/4.3/qpalette.html">Trolltech's site</ulink>.
1005 Attribute names are composed from a scope, a color role and a suffix.
1007 Possible scopes are - in order of increasing precedence -
1008 <literal>all-</literal> for all color groups,
1009 no scope for the active and inactive color groups and
1010 <literal>active-</literal>, <literal>inactive-</literal> and
1011 <literal>disabled-</literal> for the respective color group.
1013 Supported color roles are
1014 <literal>window</literal>, <literal>window-text</literal>,
1015 <literal>base</literal>, <literal>alternate-base</literal>,
1016 <literal>text</literal>, <literal>bright-text</literal>,
1017 <literal>highlight</literal>, <literal>highlighted-text</literal>,
1018 <literal>button</literal> and <literal>button-text</literal>.
1020 The suffix can be <literal>-color</literal> or
1021 <literal>-alpha</literal> with the respective meaning as in
1022 <link linkend="nor-act-pre-nodes">normal/active/prelight nodes</link>.
1028 <style edit-font="Comic 16" text-color="#dddddd" frame="true"/>
1033 <sect2 id="color-nodes">
1034 <title>Face Browser Color Nodes</title>
1037 Color nodes permit overriding the background color of the items
1038 in the face browser. <literal>labelcolor</literal> and
1039 <literal>altlabelcolor</literal> are essentially equivalent to
1040 <literal>all-base-color</literal> resp.
1041 <literal>all-alternate-base-color</literal> in
1042 <link linkend="style-nodes">style nodes</link>.
1043 If only <literal>labelcolor</literal> is specified, alternating
1044 item backgrounds are disabled.
1049 <color labelcolor="#80ffffff" altlabelcolor="#80f0f0f0"/>
1054 <sect2 id="text-nodes">
1055 <title>Text Nodes</title>
1058 Text tags are used by labels. They can be used to display
1059 localized text as follows (if the <literal>xml:lang</literal>
1060 attribute is omitted, the POSIX locale is assumed):
1062 <text xml:lang="fr">Option</text>
1068 You can include pango markup in the text nodes for labels, however
1069 you must encode it. So for example to have the label of
1070 "foo<sup>bar</sup>", you must type:
1072 <text>"foo<sup>bar</sup>"</text>
1078 Text nodes can contain the following special character sequences
1079 which will be translated as follows:
1083 <?dbhtml list-presentation="table"?>
1084 <segtitle>Sequence</segtitle><segtitle>Expansion</segtitle>
1088 <seg>A literal % character</seg>
1093 <seg>Wall clock time and date</seg>
1098 <seg>Display name (<envar>DISPLAY</envar> environment variable)</seg>
1103 <seg>Hostname (<function>gethostname</function> output)</seg>
1108 <seg>Machine name (<structfield>machine</structfield> part of
1109 <function>uname</function> output)</seg>
1114 <seg>Node name (<structfield>nodename</structfield> part of
1115 <function>uname</function> output)</seg>
1120 <seg>Domain name (<function>getdomainname</function> output)</seg>
1125 <seg>Release name (<structfield>release</structfield> part of
1126 <function>uname</function> output)</seg>
1131 <seg>System name (<structfield>sysname</structfield> part of
1132 <function>uname</function> output)</seg>
1137 <seg>Remaining number of seconds until timed login is performed,
1138 plus the appropriate i18n plural form of <quote>second</quote></seg>
1143 <seg>Username for timed login</seg>
1146 <!-- Need to switch to richtext painting for this purpose.
1155 <seg>Causes the following character to be an accelerator</seg>
1161 <literal>%t</literal> and <literal>%u</literal> are intended to be
1162 used only internally to display the <literal>timed-label</literal>
1163 message, which is automatically updated every second.
1167 <sect2 id="stock-nodes">
1168 <title>Stock Nodes</title>
1171 Certain common localized labels can be specified via the stock
1172 tags. The <literal>text</literal> tag is ignored if the
1173 <literal>stock</literal> tag is used. You really should use the
1174 stock labels rather than just putting all the translations into
1175 the themes. This yields faster load times and likely better
1176 translations. The following values are valid:
1180 <?dbhtml list-presentation="table"?>
1181 <segtitle>Type</segtitle><segtitle>Expansion</segtitle>
1186 <seg><quote>_OK</quote></seg>
1197 <seg>custom_cmd[0-9]</seg>
1198 <seg>Obtained from the config file.</seg>
1202 <seg>caps-lock-warning</seg>
1203 <seg><quote>Caps Lock is enabled</quote></seg>
1207 <seg><quote>XDMCP Choose_r</quote></seg>
1211 <seg><quote>_Quit</quote></seg>
1214 <seg>disconnect</seg>
1215 <seg><quote>Disconn_ect</quote></seg>
1219 <seg><quote>Power o_ff</quote></seg>
1223 <seg><quote>Lan_guage</quote></seg>
1227 <seg><quote>_Login</quote></seg>
1231 <seg><quote>Session _Type</quote></seg>
1235 <seg><quote>Re_boot</quote></seg>
1240 <seg><quote>Sus_pend</quote></seg>
1245 <seg><quote>_Menu</quote></seg>
1248 <seg>timed-label</seg>
1249 <seg><quote>User %u will login in %t</quote></seg>
1252 <seg>domain-label</seg>
1253 <seg><quote>_Domain:</quote></seg>
1256 <seg>username-label</seg>
1257 <seg><quote>_Username:</quote></seg>
1260 <seg>password-label</seg>
1261 <seg><quote>_Password:</quote></seg>
1264 <seg>welcome-label</seg>
1265 <seg><quote>Welcome to %h</quote></seg>
1273 <stock type="welcome-label"/>
1278 <sect2 id="buddy-nodes">
1279 <title>Buddy Nodes</title>
1282 Items which do not directly cause an action can be assigned a buddy.
1283 The buddy is given input focus when the item is activated (clicked
1284 or a <literal>label</literal>'s accelerator pressed).
1288 The buddy is referenced by id with the <literal>idref</literal>
1289 attribute. Obviously, it must be given an id. Example:
1291 <item type="label">
1292 <stock type="username-label"/>
1293 <buddy idref="user-entry"/>
1297 <item type="entry" id="user-entry">