<?xml version="1.0" encoding="UTF-8"?>

<chapter id="design">

  <title>Visual Design</title>

  <para>Visual design is not just about making your application look pretty.  Good visual design is about communication.  A well-designed application will make it easy for the user to understand the information that is being presented, and show them clearly how they can interact with that information.  If you can achieve all that, your application <emphasis>will</emphasis> look good to the user, even if it doesn't have any fancy graphics or spinning logos!</para>
  <!-- GJM: This kind of folksy remark really is not appropriate at all. -->
  <!-- TODO:
  - More than any other section this needs to be liberally sprinkled with examples
  -->

  <!-- Color section based on Coleen's HTML draft -->

  <sect1 id="design-color">
    <title>Color</title>

    <para>Color is a good tool for communicating information in a user interface. For example, it can be used to:</para>

    <itemizedlist>
      <listitem><para>strengthen a desktop's look and feel by enhancing a theme</para></listitem>
      <listitem><para>accent a dynamic alert in a system management application</para></listitem>
      <listitem><para>emphasize an element in a long list to expedite scanning</para></listitem>
      <listitem><para>add aesthetically pleasing details to an icon</para></listitem>
    </itemizedlist>

    <para>However, color should always be regarded as a useful addition to your design, not as a necessity. Never depend upon colors alone to display important information, and keep in mind that if colors cannot be perceived correctly (for example, the user has an 8-bit system, or is color-blind), your application should still be usable. </para>

    <sect2 id="Palette">
      <title>Palette</title>
      
      <!-- primary contributor to the href="http://primates.ximian.com/~tigert/new_stock_project/" GNOME stock icon repository -->
      
      <para>A 32-color palette has been developed for the GNOME desktop. The palette may be downloaded from <ulink url="http://developer.gnome.org/projects/gup/images/ximian-palette">http://developer.gnome.org/projects/gup/images/ximian-palette</ulink>. To use it in The GIMP, save it to your <filename>~/.gimp_1.2/palettes</filename> folder, and restart The GIMP. A single, consistently-used palette helps give a unified look and feel to the desktop while minimizing visual distractions. If you need a color that is darker or lighter than the colors in this basic palette (e.g., for anti-aliasing), choose a color that is closest to the hue you need, then darken or lighten as required.</para>

      <figure><title>The basic GNOME 32-color palette</title>
	<mediaobject>
	  <imageobject><imagedata fileref="images/visdes-palette.png" format="PNG"/></imageobject>
	  <imageobject><imagedata fileref="images/visdes-palette.eps" format="EPS"/></imageobject>
	  <textobject><phrase>The basic GNOME 32-color palette</phrase></textobject>
	</mediaobject>
      </figure>
      
      <table frame="none"> 
	<title>RGB and hexadecimal values for the basic palette</title> 
	<tgroup cols="8" colsep="1" rowsep="0" align="left">
	  <thead> 
	    <row rowsep="1" valign="top"> 
	      <entry>Color</entry> 
	      <entry>Description</entry>
	      <entry>RGB</entry>
	      <entry>Hex</entry>
	      <entry>Color</entry>
	      <entry>Description</entry>
	      <entry>RGB</entry>
	      <entry>Hex</entry>
	    </row>
	  </thead>
	  <tbody valign="middle">
	    <row>
	      <entry><mediaobject>
		  <imageobject><imagedata fileref="images/visdes-palette-1.png" format="PNG"/></imageobject>
		  <imageobject><imagedata fileref="images/visdes-palette-1.eps" format="EPS"/></imageobject>
		</mediaobject></entry>
	      <entry>Basic 3D Hilight</entry>
	      <entry>234 232 227</entry>
	      <entry>#EAE8E3 </entry>
	      <entry><mediaobject>
		  <imageobject><imagedata fileref="images/visdes-palette-2.png" format="PNG"/></imageobject>
		  <imageobject><imagedata fileref="images/visdes-palette-2.eps" format="EPS"/></imageobject>
		</mediaobject></entry>
	      <entry>Basic 3D Medium</entry>
	      <entry>186 181 171</entry>
	      <entry>#BAB5AB</entry>
	    </row>
	    <row> 
	      <entry><mediaobject>
		  <imageobject><imagedata fileref="images/visdes-palette-3.png" format="PNG"/></imageobject>
		  <imageobject><imagedata fileref="images/visdes-palette-3.eps" format="EPS"/></imageobject>
		</mediaobject></entry>
	      <entry>Basic 3D Dark</entry>
	      <entry>128 125 116</entry>
	      <entry>#807D74 </entry>
	      <entry><mediaobject>
		  <imageobject><imagedata fileref="images/visdes-palette-4.png" format="PNG"/></imageobject>
		  <imageobject><imagedata fileref="images/visdes-palette-4.eps" format="EPS"/></imageobject>
		</mediaobject></entry>
	      <entry>3D Shadow</entry>
	      <entry>86 82 72</entry>
	      <entry>#565248 </entry>
	    </row>
	    <row> 
	      <entry><mediaobject>
		  <imageobject><imagedata fileref="images/visdes-palette-5.png" format="PNG"/></imageobject>
		  <imageobject><imagedata fileref="images/visdes-palette-5.eps" format="EPS"/></imageobject>
		</mediaobject></entry>
	      <entry>Green Hilight</entry>
	      <entry>197 210 200</entry>
	      <entry>#C5D2C8 </entry>
	      <entry><mediaobject>
		  <imageobject><imagedata fileref="images/visdes-palette-6.png" format="PNG"/></imageobject>
		  <imageobject><imagedata fileref="images/visdes-palette-6.eps" format="EPS"/></imageobject>
		</mediaobject></entry>
	      <entry>Green Medium</entry>
	      <entry>131 166 127</entry>
	      <entry>#83A67F </entry>
	    </row>
	    <row> 
	      <entry><mediaobject>
		  <imageobject><imagedata fileref="images/visdes-palette-7.png" format="PNG"/></imageobject>
		  <imageobject><imagedata fileref="images/visdes-palette-7.eps" format="EPS"/></imageobject>
		</mediaobject></entry>
	      <entry>Green Dark</entry>
	      <entry>93 117 85</entry>
	      <entry>#5D7555 </entry>
	      <entry><mediaobject>
		  <imageobject><imagedata fileref="images/visdes-palette-8.png" format="PNG"/></imageobject>
		  <imageobject><imagedata fileref="images/visdes-palette-8.eps" format="EPS"/></imageobject>
		</mediaobject></entry>
	      <entry>Green Shadow</entry>
	      <entry>68 86 50</entry>
	      <entry>#445632 </entry>
	    </row>
	    <row> 
	      <entry><mediaobject>
		  <imageobject><imagedata fileref="images/visdes-palette-9.png" format="PNG"/></imageobject>
		  <imageobject><imagedata fileref="images/visdes-palette-9.eps" format="EPS"/></imageobject>
		</mediaobject></entry>
	      <entry>Red Hilight</entry>
	      <entry>224 182 175</entry>
	      <entry>#E0B6AF </entry>
	      <entry><mediaobject>
		  <imageobject><imagedata fileref="images/visdes-palette-10.png" format="PNG"/></imageobject>
		  <imageobject><imagedata fileref="images/visdes-palette-10.eps" format="EPS"/></imageobject>
		</mediaobject></entry>
	      <entry>Red Medium</entry>
	      <entry>193 102 90</entry>
	      <entry>#C1665A </entry>
	    </row>
	    <row> 
	      <entry><mediaobject>
		  <imageobject><imagedata fileref="images/visdes-palette-11.png" format="PNG"/></imageobject>
		  <imageobject><imagedata fileref="images/visdes-palette-11.eps" format="EPS"/></imageobject>
		</mediaobject></entry>
	      <entry>Red Dark</entry>
	      <entry>136 70 49</entry>
	      <entry>#884631 </entry>
	      <entry><mediaobject>
		  <imageobject><imagedata fileref="images/visdes-palette-12.png" format="PNG"/></imageobject>
		  <imageobject><imagedata fileref="images/visdes-palette-12.eps" format="EPS"/></imageobject>
		</mediaobject></entry>
	      <entry>Red Shadow</entry>
	      <entry>102 56 34</entry>
	      <entry>#663822 </entry>
	    </row>
	    <row> 
	      <entry><mediaobject>
		  <imageobject><imagedata fileref="images/visdes-palette-13.png" format="PNG"/></imageobject>
		  <imageobject><imagedata fileref="images/visdes-palette-13.eps" format="EPS"/></imageobject>
		</mediaobject></entry>
	      <entry>Purple Hilight</entry>
	      <entry>173 167 200</entry>
	      <entry>#ADA7C8 </entry>
	      <entry><mediaobject>
		  <imageobject><imagedata fileref="images/visdes-palette-14.png" format="PNG"/></imageobject>
		  <imageobject><imagedata fileref="images/visdes-palette-14.eps" format="EPS"/></imageobject>
		</mediaobject></entry>
	      <entry>Purple Medium</entry>
	      <entry>136 127 163</entry>
	      <entry>#887FA3 </entry>
	    </row>
	    <row> 
	      <entry><mediaobject>
		  <imageobject><imagedata fileref="images/visdes-palette-15.png" format="PNG"/></imageobject>
		  <imageobject><imagedata fileref="images/visdes-palette-15.eps" format="EPS"/></imageobject>
		</mediaobject></entry>
	      <entry>Purple Dark</entry>
	      <entry>98 91 129</entry>
	      <entry>#625B81 </entry>
	      <entry><mediaobject>
		  <imageobject><imagedata fileref="images/visdes-palette-16.png" format="PNG"/></imageobject>
		  <imageobject><imagedata fileref="images/visdes-palette-16.eps" format="EPS"/></imageobject>
		</mediaobject></entry>
	      <entry>Purple Shadow</entry>
	      <entry>73 64 102</entry>
	      <entry>#494066 </entry>
	    </row>
	    <row> 
	      <entry><mediaobject>
		  <imageobject><imagedata fileref="images/visdes-palette-17.png" format="PNG"/></imageobject>
		  <imageobject><imagedata fileref="images/visdes-palette-17.eps" format="EPS"/></imageobject>
		</mediaobject></entry>
	      <entry>Blue Hilight</entry>
	      <entry>157 184 210</entry>
	      <entry>#9DB8D2 </entry>
	      <entry><mediaobject>
		  <imageobject><imagedata fileref="images/visdes-palette-18.png" format="PNG"/></imageobject>
		  <imageobject><imagedata fileref="images/visdes-palette-18.eps" format="EPS"/></imageobject>
		</mediaobject></entry>
	      <entry>Blue Medium</entry>
	      <entry>117 144 174</entry>
	      <entry>#7590AE </entry>
	    </row>
	    <row> 
	      <entry><mediaobject>
		  <imageobject><imagedata fileref="images/visdes-palette-19.png" format="PNG"/></imageobject>
		  <imageobject><imagedata fileref="images/visdes-palette-19.eps" format="EPS"/></imageobject>
		</mediaobject></entry>
	      <entry>Blue Dark</entry>
	      <entry>75 105 131</entry>
	      <entry>#4B6983 </entry>
	      <entry><mediaobject>
		  <imageobject><imagedata fileref="images/visdes-palette-20.png" format="PNG"/></imageobject>
		  <imageobject><imagedata fileref="images/visdes-palette-20.eps" format="EPS"/></imageobject>
		</mediaobject></entry>
	      <entry>Blue Shadow</entry>
	      <entry>49 78 108</entry>
	      <entry>#314E6C </entry>
	    </row>
	    <row> 
	      <entry><mediaobject>
		  <imageobject><imagedata fileref="images/visdes-palette-21.png" format="PNG"/></imageobject>
		  <imageobject><imagedata fileref="images/visdes-palette-21.eps" format="EPS"/></imageobject>
		</mediaobject></entry>
	      <entry>Face Skin Hilight</entry>
	      <entry>239 224 205</entry>
	      <entry>#EFE0CD </entry>
	      <entry><mediaobject>
		  <imageobject><imagedata fileref="images/visdes-palette-22.png" format="PNG"/></imageobject>
		  <imageobject><imagedata fileref="images/visdes-palette-22.eps" format="EPS"/></imageobject>
		</mediaobject></entry>
	      <entry>Face Skin Medium</entry>
	      <entry>224 195 158</entry>
	      <entry>#E0C39E </entry>
	    </row>
	    <row> 
	      <entry><mediaobject>
		  <imageobject><imagedata fileref="images/visdes-palette-23.png" format="PNG"/></imageobject>
		  <imageobject><imagedata fileref="images/visdes-palette-23.eps" format="EPS"/></imageobject>
		</mediaobject></entry>
	      <entry>Face Skin Dark</entry>
	      <entry>179 145 105</entry>
	      <entry>#B39169 </entry>
	      <entry><mediaobject>
		  <imageobject><imagedata fileref="images/visdes-palette-24.png" format="PNG"/></imageobject>
		  <imageobject><imagedata fileref="images/visdes-palette-24.eps" format="EPS"/></imageobject>
		</mediaobject></entry>
	      <entry>Face Skin Shadow</entry>
	      <entry>130 102 71</entry>
	      <entry>#826647 </entry>
	    </row>
	    <row> 
	      <entry><mediaobject>
		  <imageobject><imagedata fileref="images/visdes-palette-25.png" format="PNG"/></imageobject>
		  <imageobject><imagedata fileref="images/visdes-palette-25.eps" format="EPS"/></imageobject>
		</mediaobject></entry>
	      <entry>Accent Red</entry>
	      <entry>223 66 30</entry>
	      <entry>#DF421E </entry>
	      <entry><mediaobject>
		  <imageobject><imagedata fileref="images/visdes-palette-26.png" format="PNG"/></imageobject>
		  <imageobject><imagedata fileref="images/visdes-palette-26.eps" format="EPS"/></imageobject>
		</mediaobject></entry>
	      <entry>Accent Red Dark</entry>
	      <entry>153 0 0</entry>
	      <entry>#990000 </entry>
	    </row>
	    <row> 
	      <entry><mediaobject>
		  <imageobject><imagedata fileref="images/visdes-palette-27.png" format="PNG"/></imageobject>
		  <imageobject><imagedata fileref="images/visdes-palette-27.eps" format="EPS"/></imageobject>
		</mediaobject></entry>
	      <entry>Accent Yellow</entry>
	      <entry>238 214 128</entry>
	      <entry>#EED680 </entry>
	      <entry><mediaobject>
		  <imageobject><imagedata fileref="images/visdes-palette-28.png" format="PNG"/></imageobject>
		  <imageobject><imagedata fileref="images/visdes-palette-28.eps" format="EPS"/></imageobject>
		</mediaobject></entry>
	      <entry>Accent Yellow Dark</entry>
	      <entry>209 148 12</entry>
	      <entry>#D1940C </entry>
	    </row>
	    <row> 
	      <entry><mediaobject>
		  <imageobject><imagedata fileref="images/visdes-palette-29.png" format="PNG"/></imageobject>
		  <imageobject><imagedata fileref="images/visdes-palette-29.eps" format="EPS"/></imageobject>
		</mediaobject></entry>
	      <entry>Accent Green </entry>
	      <entry>70 160 70</entry>
	      <entry>#46A046 </entry>
	      <entry><mediaobject>
		  <imageobject><imagedata fileref="images/visdes-palette-30.png" format="PNG"/></imageobject>
		  <imageobject><imagedata fileref="images/visdes-palette-30.eps" format="EPS"/></imageobject>
		</mediaobject></entry>
	      <entry>Accent Green Dark</entry>
	      <entry>38 199 38</entry>
	      <entry>#267726 </entry>
	    </row>
	    <row> 
	      <entry><mediaobject>
		  <imageobject><imagedata fileref="images/visdes-palette-31.png" format="PNG"/></imageobject>
		  <imageobject><imagedata fileref="images/visdes-palette-31.eps" format="EPS"/></imageobject>
		</mediaobject></entry>
	      <entry>White</entry>
	      <entry>255 255 255</entry>
	      <entry>#ffffff </entry>
	      <entry><mediaobject>
		  <imageobject><imagedata fileref="images/visdes-palette-32.png" format="PNG"/></imageobject>
		  <imageobject><imagedata fileref="images/visdes-palette-32.eps" format="EPS"/></imageobject>
		</mediaobject></entry>
	      <entry>Black</entry>
	      <entry>0 0 0</entry>
	      <entry>#000000 </entry>
	    </row>
	  </tbody>
	</tgroup>
      </table>
      
    </sect2>
    
    <sect2 id="hsv">
      <title>Hue, Brightness, Contrast</title>
      
      <para>Users with vision disorders, such as color-blindness or low vision, require alternatives to default settings. A good user interface anticipates these needs by providing customizable preferences and support for accessible themes. Even better is an application that is already configured with carefully-chosen color and contrast defaults.</para>

      <para>An estimated 11% of the world population has some sort of color-blindness.  Those affected typically have trouble distinguishing between certain hues such as red and green (deuteranopia or protanopia), or blue and yellow (tritanopia). Therefore it is necessary to allow the user to customize colors in any part of your application that conveys important information. This means that your application must effectively convey information using just the colors from any theme that the user chooses<!--, and that attributes such as hue and brightness are adjustable in your application's preferences dialog -->.</para>
      
      <para>A useful tool for reviewing information about color-blindness and checking legibility of images for color-blind users is <ulink url="http://www.vischeck.com/">Vischeck</ulink>, an online tool that simulates the way an image or a website might appear to a user who has deuteranopia, protanopia, or tritanopia. </para>

      <figure><title>How the earth looks to a user with normal color vision (left), deuteranopia (middle), and tritanopia (right). (Images from <ulink url="http://www.vischeck.com">http://www.vischeck.com</ulink>).</title>
	
	<informaltable frame="none">
	  <tgroup cols="3" align="center">
	    <tbody valign="top">
	      <row>
		<entry>
	          <mediaobject>
		    <imageobject><imagedata fileref="images/visdes-colorblind-normal.png" format="PNG"/></imageobject>
		    <imageobject><imagedata fileref="images/visdes-colorblind-normal.eps" format="EPS"/></imageobject>
		    <textobject><phrase>Photo of earth as a normally-sighted user would see it</phrase></textobject>
		  </mediaobject>
	        </entry>
		
		<entry>
	          <mediaobject>
		    <imageobject><imagedata fileref="images/visdes-colorblind-deutan.png" format="PNG"/></imageobject>
		    <imageobject><imagedata fileref="images/visdes-colorblind-deutan.eps" format="EPS"/></imageobject>
		    <textobject><phrase>Photo of earth as a user with red-green color-blindness would see it</phrase></textobject>
		  </mediaobject>
	        </entry>
		<entry>
	          <mediaobject>
		    <imageobject><imagedata fileref="images/visdes-colorblind-tritan.png" format="PNG"/></imageobject>
		    <imageobject><imagedata fileref="images/visdes-colorblind-tritan.eps" format="EPS"/></imageobject>
		    <textobject><phrase>Photo of earth as a user with blue-yellow color-blindness would see it</phrase></textobject>
		  </mediaobject>
	        </entry>
	      </row>
	    </tbody>
	  </tgroup>
	</informaltable>
      </figure>


      <para>Other users have more problems with contrast levels rather than hue on their screen. Some users require a high level of contrast between background and foreground colors, such as black on white, white on black, or some other high-contrast combination. Others can experience discomfort unless they use low-contrast settings, such as gray text on a lighter gray background.</para>

      <para>You can meet these needs by ensuring your application supports the accessible GNOME themes (found in the gnome-themes module in cvs), which include high and low contrast themes, and large print themes. This means you must supply default and large sizes of high-, low- and regular-contrast icon sets with your application. <!--See <xref linkend=""/> for information on how to design these icons.--></para>

      <itemizedlist><title>Guidelines</title>
	<listitem><para>Use the GNOME color palette. If you need a darker or lighter shade, start from one of the colors from the palette and darken or lighten as needed.</para></listitem>

	<listitem><para>Do not use color as the only means to distinguish items of information. All such information should be provided by at least one other method, such as shape, position or textual description.</para></listitem>

	<listitem><para>Ensure your application is not dependent on a particular theme. Test it with different themes, especially high and low contrast accessibility themes, which use fewer colors, to ensure your application respects the settings. For example, all text should appear in the foreground color against the background color specified in the chosen theme.</para></listitem>

	<listitem><para>Select colors carefully.  When they need to be recognizably different, select the light colors from orange, yellow, green or blue-green, and darker colors from blue, violet, purple or red, as most people affected by color-blindness already see blue, violet, purple and red as darker than normal.</para></listitem>

      </itemizedlist>

    </sect2>
  </sect1>

  <sect1 id="design-window">
    <title>Window Layout</title>
    
    <sect2>
      <title>General</title> 

      <para>Placement of visual components in an application is important because relationships between elements are indicated by their positions. This is called &quot;layout&quot; in interface design.</para>

      <para>A clean layout is crucial to creating a smooth visual flow of information for the user. This section describes the proper component placement and spacing to use in GNOME applications. The major components discussed will be labels, icons, radio buttons and check boxes, text fields, command buttons, and drop-down menus.</para>

    </sect2>

    <sect2 id="layout-dialogs">
      <title>Dialogs</title>
      
      <para>When a user is scanning a complex preferences dialog consisting of many labels and corresponding check boxes, text fields, and drop-down combination boxes, it is easy to see how she can quickly become hindered by poor layout in the visual design. For information on laying out Alerts, see <xref linkend="alert-spacing"/></para>

      <figure id="improved-layout-figure"><title>Improved window layout</title>
	
	<informaltable frame="none">
	  <tgroup cols="2" align="center">
	    <tbody valign="top">
	      <row>
		<entry>
	          <mediaobject>
		    <imageobject><imagedata fileref="images/visdes-layout-poor.png" format="PNG"/></imageobject>
		    <imageobject><imagedata fileref="images/visdes-layout-poor.eps" format="EPS"/></imageobject>
		    <textobject><phrase>Initial layout with poor alignment and limited use of white space</phrase></textobject>
		  </mediaobject>
	        </entry>
		
		<entry>
	          <mediaobject>
		    <imageobject><imagedata fileref="images/visdes-layout-good.png" format="PNG"/></imageobject>
		    <imageobject><imagedata fileref="images/visdes-layout-good.eps" format="EPS"/></imageobject>
		    <textobject><phrase>Improved layout with fewer alignment points, frames removed to relieve clutter, and clearer grouping with use of white space</phrase></textobject>
		  </mediaobject>
	        </entry>
	      </row>
	    </tbody>
	  </tgroup>
	</informaltable>
      </figure>

      <!-- picture here of a complex preferences dialog, badly designed: right-aligned similar length labels, very little spacing between elements (vertically), varying spaces between elements (horizontally) -->

      <para>In <xref linkend="improved-layout-figure"/>, the dialog on the left presents labels which are not left-aligned. The user's eye is not given a proper anchor to scan the dialog quickly.</para>

      <para>As the labels are all similar in length, they should be left-aligned. Now the user has a firm left margin to anchor the eye and scan the list of items vertically more easily. If most of the labels in a group greatly differ in length, right-align them instead, so that the controls do not end up too far away from their corresponding labels.</para>

      <para>Using frames with visible borders to separate groups within a window is deprecated. Use spacing and bold headers instead. This is more effective because there are fewer gratuitous lines to distract the user from the main content in the window. See <xref linkend="controls-frames"/> for more details.</para>

      <para>Try to keep components consonant with each other in terms of size and alignment. This is particularly important within a group of controls, so that the user's ability to quickly scan information is not sacrificed.  Minimize as much as possible the need for the user's eye to jump around when scanning a layout.</para>
      
      <figure id="layout-callouts-figure"><title>Layout specifications</title>
	
	<mediaobject>
	  <imageobject><imagedata fileref="images/visdes-layout-annotated.png" format="PNG"/></imageobject>
	  <imageobject><imagedata fileref="images/visdes-layout-annotated.eps" format="EPS"/></imageobject>
	  <textobject><phrase>Improved layout with fewer alignment points, frames removed to relieve clutter, and clearer grouping with use of white space</phrase></textobject>
	</mediaobject>
      </figure>
      
      <!-- Figure here of the above paragraph, giving examples -->

      <itemizedlist> <title>Guidelines</title>
	<listitem><para>Leave a 12-pixel border between the edge of the window and the nearest controls.</para></listitem>
	<listitem><para>Leave a 12-pixel horizontal gap between a control and its label.  (The gap may be bigger for other controls in the same group, due to differences in the lengths of the labels.)</para></listitem>
	<listitem><para>Labels must be concise and make sense when taken out of context.  Otherwise, users relying on screenreaders or similar assistive technologies will not always be able to immediately understand the relationship between a control and those surrounding it.</para></listitem>
	<!--		<listitem><para>Assign access keys to all editable controls.  Ensure that labels immediately precede their associated control in the tab order, so that the access key will focus to or activate the correct control when pressed.</para></listitem>
	<remark>GJM: I almost missed this instance of this error which is repeated below; except that it says mnemonic instead of access key. This entire section is a repeat, it seems. Adding restated listitem.</remark>
	-->
	<listitem><para>Assign access keys to all editable controls. Ensure that using the access key focuses its associated control.</para></listitem>
      </itemizedlist>

    </sect2>

<!-- 
I'm commenting out this section for the HIG 2.8 release pending "still needs more work" -Seth

    <sect2 id="layout-window-size">
	<title>Size</title>
	<remark>This section taken from Alan's draft in bug #111772, still needs some work</remark>
	<para>GNOME is used on by many different people on a wide variety of
different hardware.  This includes people with older hardware and 
small displays.  Laptop users and users of other portable devices also
need to be able to work on smaller screens. Users who require large fonts, or assistive technologies that take over part of the screen, also have a correspondingly smaller area in which to display application windows and dialogs.</para> 

<para>While these space restrictions are intended primarily to allow people
with smaller displays to use Gnome it is also good discipline to keep
windows and dialogs clear with not to many concepts all at once. 
<remark>The sentiment of this
paragraph might be useful although it would need to be massively
rephrased-AH.</remark></para>

	<itemizedlist><title>Guidelines</title>

	<listitem><para>Try to ensure that the size of a window is no larger than 480 pixels
wide and 640 pixels hight in the default theme (including window
decorations).  Ideally your application should be usable at 600 by 400
pixels which leaves enough room for both top and bottom Panels.</para></listitem>  

	<listitem><para>The Ratio of the screen width to height is 2:3 and things will look
aesthetically pleasing if we can keep (near to) this proportion. <remark>This ratio isn't always the case these days, with widescreen monitors and PDA-type devices becoming more common-CB</remark>.  
<remark> The
space take by window decorations largely spoils this idealism-AH.</remark>
Dialogs [like a properties dialog] should [probably] be 300 by 400.  
Message Dialogs should be 600 by 200.<remark> I'm not sure specifying pixel dimensions for anything we don't really have to is such a good plan- perhaps just stick to the 'golden ratio' guideline that currently lives in next section?- CB.</remark></para></listitem>
	</itemizedlist>

	</sect2>

-->

    <sect2 id="window-layout-spacing">
      <title>Spacing and Alignment</title>
      
      <para>Provide adequate space between controls and groups of controls. This white space will make it easier for the user to find the information they need.</para>

      <itemizedlist><title>Guidelines</title>

	<listitem><para>As a basic rule of thumb, leave space between user interface components in increments of 6 pixels, going up as the relationship between related elements becomes more distant. For example, between icon labels and associated graphics within an icon, 6 pixels are adequate. Between labels and associated components, leave 12 horizontal pixels. For vertical spacing between groups of components, 18 pixels is adequate. A general padding of 12 pixels is recommended between the contents of a dialog window and the window borders.</para></listitem>
	
	<listitem><para>Break long lists of choices into smaller groups. For lists of less than about eight items, use radio buttons or check boxes. For longer lists, use a list control or drop-down list.</para></listitem>
	
	<listitem><para>Try to keep elements of the same type left-aligned with each other. For instance, in <xref linkend="layout-callouts-figure"/>, the group titles (<guilabel>General</guilabel> and <guilabel>Actions</guilabel>) are left-aligned and justified with each other.</para></listitem>

	<listitem><para>Indent group members 12 pixels to denote hierarchy and association.</para></listitem>
	<listitem><para>Minimize the number of alignment points in your window. An alignment point is an imaginary vertical or horizontal line through your window that touches the edge of one or more labels or controls in the window.</para></listitem>

	<listitem><para>Right-justification within groups or the overall window (as indicated by the line labelled "justification" in <xref linkend="layout-callouts-figure"/> is pleasing to the eye, but not crucial.</para></listitem>
	
	<listitem><para>Lay out components left-to-right, top-to-bottom. Generally, the first element the user is meant to encounter should be in the top-left, and the last in the bottom right. Keep in mind that when localized for non-western locales, interfaces may be reversed so that they read from right to left.</para></listitem>
	
	<listitem><para>Using "white" or blank spacing and indentation to delineate groups is cleaner and preferable to using graphical separators such as frames.
	  </para></listitem>
	
	<listitem><para>Align controls in your layout <emphasis>exactly</emphasis>. The eye is very sensitive to aligned and unaligned objects. If nothing lines up with anything else in a window, it will be very hard for the user to scan the contents and find the information he wants. Two things that almost line up, but not quite, are equally distracting.</para></listitem>
	
	<listitem><para>Be consistent. Use the same spacing, alignment, and component sizes in all dialogs appearing in your application. The <guibutton>OK</guibutton> and <guibutton>Cancel</guibutton> buttons, for example, should all appear exactly 12 vertical and horizontal pixels from the lower right corner of every dialog window.</para></listitem>
	
	<listitem><para>Ensure that light and dark areas as well as spacing are equally distributed around the window. Keep in mind that every control or group of controls in your window has a visual "weight," depending on its overall size, color, and how much white space it includes. Darker, larger areas are "heavier," while paler, smaller areas are "lighter."</para></listitem>
	
	<listitem><para>Do not design windows that are more than 50% longer in one dimension than in the other. People are more comfortable looking at windows and dialogs whose dimensions stay within the golden ratio (about 1.6 to 1), a ratio that artists and architects have used to create aesthetically-pleasing paintings and buildings for thousands of years.</para></listitem>
	
	<!-- <para><listitem>Do not resize components to fit arbitrary or uncommon layout needs. Make it a practice to use GtkTables, GtkVBox and GtkHBox container widgets at their default /* Calum, is there such a thing? */ row, column and border sizes. This will help ensure that a lot of layout and alignment work is done for you automatically.</para></listitem>-->
	
      </itemizedlist>
      <!--
      <note id="frame-layout-tech"><title>Technical Details for Proper Layout</title>
      <para>Set <property>Border Width</property> for the GtkDialog to <userinput>12</userinput>. Place a GtkVBox containing as many rows as you wish to have categories inside the control area of the GtkDialog, and set the <property>Spacing</property> for the GtkVBox to <userinput>18</userinput>.</para>
      <para>In turn, each category should be composed of a GtkVBox with two rows. Set the <property>Spacing</property> to <userinput>6</userinput>.
      <itemizedlist>
      <listitem><para>In the top row, place a label for the category header. Make the label bold using the Pango markup <programlisting>&lt;span weight="bold"&gt;<replaceable>Category Header</replaceable>&lt;/span&gt;</programlisting> Set the label property <property>Use Markup</property> to <userinput>Yes</userinput>, and <property>X Align</property> to <userinput>0.0</userinput> to left align the label.</para></listitem>
      <listitem><para>Place a 2-columned GtkHBox in the lower row of the top-level GtkVBox.
      <itemizedlist>
      <listitem><para>In the left column, place a label containing four space characters. This will serve to indent the category contents.</para></listitem>
      <listitem><para>In the right column, place a GtkVBox containing a row per control you wish to place in the category. Set the <property>Spacing</property> to <userinput>6</userinput>.
      <itemizedlist>
      <listitem><para>For left-side labelled controls such as text boxes, drop-down lists, and many others, place a 2 columned GtkHBox inside the row with a label in the left column and the corresponding control in the right. Set the <property>Spacing</property> on the GtkHBox to <userinput>6</userinput>. Place all labels such as this (for the whole window) in the same GtkSizeGroup (there is currently no way to do this using only Glade, you will have to use code as well). This will align the controls to their right, even between categories, which is important for allowing quick visual scans.</para></listitem>
      <listitem><para>For right-side labelled controls such as check boxes and radio buttons, simply place them directly in the row.</para></listitem>
    </itemizedlist>
    </para></listitem>
    </itemizedlist>
    </para></listitem>
    </itemizedlist>
    </para>
    </note>
      -->
    </sect2>
    
  </sect1>

  <sect1 id="design-text-labels">
    <title>Text Labels</title>
    
    <para>To a user with normal vision, textual output provides the majority of the information and feedback in most applications. To a visually-impaired user who may not be able to see or understand any additional graphical output, clear textual output is critical. You must therefore choose and position text carefully on the screen, and leave the choice of fonts and sizes to the user, to ensure that all users are able to use your application effectively.</para>

    <sect2 id="layout-label-position">
      
      <title>Spacing and Alignment</title>

      <para>Use spacing and alignment of text uniformly throughout your application. A basic rule of thumb is to put space between user interface components in increments of 6 pixels, going up as the relationship between related elements becomes more distant.</para>

      <table id="label-placement-example">
	<title>Alignment and spacing for different Text elements</title>
	<tgroup cols="3" align="left">
	  <thead>
	    <row>
	      <entry>Element</entry>
	      <entry>Placement</entry>
	      <entry>Example</entry>
	    </row>
	  </thead>
	  
	  <tbody>
	    <row>
	      <entry>Large Icons (file browser)</entry>
	      <entry>Horizontally centered with and (6 pixels, if specification necessary)below large icon</entry>
	      <entry align="center" valign="middle">
		<mediaobject>
		  <imageobject><imagedata fileref="images/visdes-large-icon-label.png" format="PNG"/></imageobject>
		  <imageobject><imagedata fileref="images/visdes-large-icon-label.eps" format="EPS"/></imageobject>
		  <textobject><phrase>Large icon with text label centered below</phrase></textobject>
		</mediaobject>
	      </entry>
	    </row>
	    
	    <row>
	      <entry>Small icons (toolbar)</entry>
	      <entry>Vertically centered with and (6 pixels, if specification necessary) to the right of small icons</entry>
	      <entry align="center" valign="middle">
		<mediaobject>
		  <imageobject><imagedata fileref="images/visdes-small-icon-label.png" format="PNG"/></imageobject>
		  <imageobject><imagedata fileref="images/visdes-small-icon-label.eps" format="EPS"/></imageobject>
		  <textobject><phrase>Small icon with text label to the right</phrase></textobject>
		</mediaobject>
	      </entry>
	    </row>
	    
	    <row>
	      <entry>List control label</entry>
	      <entry>6 pixels above and horizontally left aligned with list control or 12 pixels to the left of and horizontally top aligned with list control</entry>
	      <entry align="center" valign="middle">
		<mediaobject>
		  <imageobject><imagedata fileref="images/visdes-list-label.png" format="PNG"/></imageobject>
		  <imageobject><imagedata fileref="images/visdes-list-label.eps" format="EPS"/></imageobject>
		  <textobject><phrase>List control with text label horizontally aligned above</phrase></textobject>
		</mediaobject>
	      </entry>
	    </row>

	    <row>
	      <entry>Radio button and check box labels</entry>
	      <entry>6 pixels to the right of and vertically center aligned with radio button</entry>
	      <entry align="center" valign="middle">
		<mediaobject>
		  <imageobject><imagedata fileref="images/visdes-radiobutton-label.png" format="PNG"/></imageobject>
		  <imageobject><imagedata fileref="images/visdes-radiobutton-label.eps" format="EPS"/></imageobject>
		  <textobject><phrase>Radio button with text label to its right</phrase></textobject>
		</mediaobject>
	      </entry>

	    </row>

	    <row> 
	      <entry>Text field labels</entry>
	      <entry>6 pixels to the left of and vertically center aligned with textfield control</entry>
	      <entry align="center" valign="middle">
		<mediaobject>
		  <imageobject><imagedata fileref="images/visdes-textbox-label.png" format="PNG"/></imageobject>
		  <imageobject><imagedata fileref="images/visdes-textbox-label.eps" format="EPS"/></imageobject>
		  <textobject><phrase>Textbox with text label to its left</phrase></textobject>
		</mediaobject>
	      </entry>
	    </row>
	    
	    <row>
	      <entry>Button labels</entry>
	      <entry>12 pixels of padding to either side of centered text (and any accompanying graphic). If appearing in a group of buttons, longest button label sets button size, center all other button labels and accompanying graphics in same-sized buttons</entry>
	      <entry align="center" valign="middle">
		<mediaobject>
		  <imageobject><imagedata fileref="images/visdes-button-label.png" format="PNG"/></imageobject>
		  <imageobject><imagedata fileref="images/visdes-button-label.eps" format="EPS"/></imageobject>
		  <textobject><phrase>Buttons with centered text</phrase></textobject>
		</mediaobject>
	      </entry>
	    </row>
	    <row> 
	      <entry>Other component labels (e.g., spin boxes, text fields </entry>
	      <entry>12 pixels between the longest text label and its associated component, all other text labels in component grouping left aligned with the longest label. All labels vertically center aligned with associated components</entry>
	      <entry  align="center" valign="middle">
		<mediaobject>
		  <imageobject><imagedata fileref="images/visdes-other-labels.png" format="PNG"/></imageobject>
		  <imageobject><imagedata fileref="images/visdes-other-labels.eps" format="EPS"/></imageobject>
		  <textobject><phrase>Drop-down list with label to its left</phrase></textobject>
		</mediaobject>
	      </entry>
	    </row>
	  </tbody>
	</tgroup>
      </table>

      

      <itemizedlist><title>Guidelines</title>
	<listitem><para>If the label precedes the control it is labelling, end the label with a colon. For example, <guilabel>Email:</guilabel> to label a text field into which the user should type their email address. This helps identify it as a control's label rather than an independent item of text.  Some assistive technology screen review utilities may also use the presence of a colon to identify text as a control label.</para></listitem>
	
	<!--	<listitem><para>When you use static text to label a control, ensure that the label immediately precedes that control in the Tab order. This will ensure that the access key (underlined character) you assign to the label will move focus to or activate the correct control when pressed.</para></listitem> 
	<remark>GJM: This is just wrong. Glade may have an "auto" target for labels with mnemonics that
	works this way, but it isn't part of GTK+. Adding the next listitem, though it could be better written.</remark>
	-->
	<listitem><para>Ensure that a label with a mnemonic is associated with the control it labels.</para></listitem>

	<listitem><para>Left-align components and labels, unless all the labels in a group have very different lengths. If they do, right-align the labels instead, to ensure that no controls end up too far away from their corresponding labels.</para></listitem>

	<listitem><para>Choose label names carefully. Label objects with names that make sense when taken out of context. Users relying on screenreaders or similar assistive technologies will not always be able to immediately understand the relationship between a control and those surrounding it.</para></listitem>

	<listitem><para>Be consistent with label usage and semantics. For example, if you use the same label in different windows, it will help if it means the same thing in both windows. Equally, don't use labels that are spelled differently but sound the same, e.g., "Read" and "Red", as this could be confusing for users relying on screenreaders.</para></listitem>

	<listitem><para>Don't use the same label more than once in the same window.  This makes life difficult for users relying on tools like magnifiers or screen readers, which cannot always convey surrounding context to the user.</para></listitem>
	
	<listitem><para>Do not hard-code font styles and sizes. The user should be able to adjust all sizes and typefaces.</para></listitem>
	
	<listitem><para>Do not use more than two or three different fonts and sizes in your application, and choose visually distinct rather than similar-looking fonts in one window. Too many font sizes and styles will make the interface look cluttered and unprofessional, and be harder to read. In general, always use fonts from the current theme, and specify relative rather than absolute sizes.</para></listitem>
	
	<listitem><para>Do not use graphical backdrops or &quot;watermarks&quot; behind text, other than those specified by the user's chosen theme. These interfere with the contrast between the text and its background.  This can cause difficulty for users with visual impairments, who will therefore normally choose themes that always use plain backdrops.</para></listitem>
	
      </itemizedlist>
      
    </sect2>
    
    
    <sect2 id="layout-capitalization">
      
      <title>Capitalization</title>

      <para>Two styles of capitalization are used in GNOME user interface elements: 
	<variablelist> 
	  <varlistentry> 
	    <term>Header capitalization</term> 
	    <listitem> 
	      <para>Capitalize all words in the element, with the following exceptions:
		
		<itemizedlist> 
		  <listitem> 
		    <para>Articles: <emphasis>a</emphasis>, <emphasis>an</emphasis>, <emphasis>the</emphasis>.</para>
		  </listitem> 
		  <listitem> 
		    <para>
		      Conjunctions: <emphasis>and</emphasis>,
		      <emphasis>but</emphasis>, <emphasis>for</emphasis>, <emphasis>not</emphasis>,
		      <emphasis>so</emphasis>, <emphasis>yet</emphasis> ... 
		    </para>
		  </listitem> 
		  <listitem> 
		    <para>
		      Prepositions of three or fewer letters:
		      <emphasis>at</emphasis>, <emphasis>for</emphasis>, <emphasis>by</emphasis>,
		      <emphasis>in</emphasis>, <emphasis>to</emphasis> ... 
		    </para>
		  </listitem> 
		</itemizedlist> 
	      </para>
	    </listitem> 
	  </varlistentry> 
	  <varlistentry> 
	    <term>Sentence capitalization</term> 
	    <listitem> 
	      <para>
		Capitalize the first letter of the first word, and any other words
		normally capitalized in sentences, such as application names. 
	      </para>
	    </listitem> 
	  </varlistentry> 
	</variablelist> 
      </para>
     
	<para>
	The following table indicates the capitalization style to use for each type
	of user interface element. 
      </para>

      <table frame="topbot"> 
	<title>Capitalization Style Guidelines for User Interface
	  Elements</title> 
	<tgroup cols="2" colsep="0" rowsep="0" align="left">
	  <thead>
	    <row rowsep="1" valign="top"> 
	      <entry colname="col1" align="left" valign="top"> 
		Element 
	      </entry> 
	      <entry colname="col2" valign="top" align="left">
		Style
	      </entry>
	    </row> 
	  </thead> 
	  <tbody> 
	    <row valign="top"> 
	      <entry colname="col1" align="left" valign="top">
		
		Check box labels 
		
	      </entry> 
	      <entry colname="col2" valign="top">
		
		Sentence 
		
	      </entry> 
	    </row> 
	    <row valign="top"> 
	      <entry colname="col1" align="left" valign="top"> 
		
		Command button labels 
		
	      </entry> 
	      <entry colname="col2" valign="top"> 
		
		Header 
		
	      </entry> 
	    </row> 
	    <row valign="top"> 
	      <entry colname="col1" align="left" valign="top"> 
		
		Column heading labels 
		
	      </entry> 
	      <entry colname="col2" valign="top"> 
		
		Header 
		
	      </entry> 
	    </row>
	    <row valign="top">
	      <entry colname="col1" align="left" valign="top">
		
		Desktop background object labels 
		
	      </entry>
	      <entry colname="col2" valign="top">
		
		Header 
		
	      </entry>
	    </row>
	    <row valign="top">
	      <entry colname="col1" align="left" valign="top">
		
		Dialog messages 
		
	      </entry>
	      <entry colname="col2" valign="top">
		
		Sentence 
		
	      </entry>
	    </row> 
	    <row valign="top"> 
	      <entry colname="col1" align="left" valign="top">
		
		Drop-down combination box labels 
		
	      </entry> 
	      <entry colname="col2" valign="top"> 
		
		Sentence 
		
	      </entry> 
	    </row> 
	    <row valign="top"> 
	      <entry colname="col1" align="left" valign="top">
		
		Drop-down list box labels 
		
	      </entry> 
	      <entry colname="col2" valign="top"> 
		
		Sentence 
		
	      </entry> 
	    </row> 
	    <row valign="top"> 
	      <entry colname="col1" align="left" valign="top"> 
		
		Field labels 
		
	      </entry> 
	      <entry colname="col2" valign="top"> 
		
		Sentence 

	      </entry> 
	    </row>
	    <row valign="top">
	      <entry colname="col1" align="left" valign="top">
		
		Filenames 
		
	      </entry>
	      <entry colname="col2" valign="top">
		
		Sentence 
		
	      </entry>
	    </row>
	    <row valign="top">
	      <entry colname="col1" align="left" valign="top">
		
		Graphic equivalent text: for example, Alt text on web pages 
		
	      </entry>
	      <entry colname="col2" valign="top">
		
		Sentence 
		
	      </entry>
	    </row> 
	    <row valign="top"> 
	      <entry colname="col1" align="left" valign="top"> 
		
		Group box or frame labels 
		
	      </entry> 
	      <entry colname="col2" valign="top"> 
		
		Header 
		
	      </entry> 
	    </row> 
	    <row valign="top"> 
	      <entry colname="col1" align="left" valign="top"> 
		
		Items in drop-down combination boxes, drop-down list boxes, and
		list boxes 
		
	      </entry> 
	      <entry colname="col2" valign="top"> 
		
		Sentence 
		
	      </entry> 
	    </row> 
	    <row valign="top"> 
	      <entry colname="col1" align="left" valign="top"> 
		
		List box labels 
		
	      </entry> 
	      <entry colname="col2" valign="top"> 
		
		Sentence 
		
	      </entry> 
	    </row>
	    <row valign="top">
	      <entry colname="col1" align="left" valign="top">
		
		Menu items 
		
	      </entry>
	      <entry colname="col2" valign="top">
		
		Header 
		
	      </entry>
	    </row>
	    <row valign="top">
	      <entry colname="col1" align="left" valign="top">
		
		Menu items in applications 
		
	      </entry>
	      <entry colname="col2" valign="top">
		
		Header 
		
	      </entry>
	    </row>
	    <row valign="top">
	      <entry colname="col1" align="left" valign="top">
		
		Menu titles in applications 
		
	      </entry>
	      <entry colname="col2" valign="top">
		
		Header 
		
	      </entry>
	    </row> 
	    <row valign="top"> 
	      <entry colname="col1" align="left" valign="top"> 
		
		Radio button labels 
		
	      </entry> 
	      <entry colname="col2" valign="top"> 
		
		Sentence 
		
	      </entry> 
	    </row> 
	    <row valign="top"> 
	      <entry colname="col1" align="left" valign="top"> 
		
		Slider labels 
		
	      </entry> 
	      <entry colname="col2" valign="top"> 
		
		Sentence 
		
	      </entry> 
	    </row> 
	    <row valign="top"> 
	      <entry colname="col1" align="left" valign="top"> 
		
		Spin box labels 
		
	      </entry> 
	      <entry colname="col2" valign="top"> 
		
		Sentence 
		
	      </entry> 
	    </row> 
	    <row valign="top">
	      <entry colname="col1" align="left" valign="top"> 

		Tabbed section titles 
		
	      </entry>
	      <entry colname="col2" valign="top">
		
		Header 
		
	      </entry>
	    </row>
	    <row valign="top"> 
	      <entry colname="col1" align="left" valign="top">
		
		Text box labels 
		
	      </entry> 
	      <entry colname="col2" valign="top">
		
		Sentence 
		
	      </entry> 
	    </row>
	    <row valign="top">
	      <entry colname="col1" align="left" valign="top">
		
		Titlebar labels 
		
	      </entry>
	      <entry colname="col2" valign="top">
		
		Header 
		
	      </entry>
	    </row>
	    <row valign="top">
	      <entry colname="col1" align="left" valign="top">
		
		Toolbar button labels 
		
	      </entry>
	      <entry colname="col2" valign="top">
		
		Header 
		
	      </entry>
	    </row>
	    <row valign="top">
	      <entry colname="col1" align="left" valign="top">
		
		Tooltips
		
	      </entry>
	      <entry colname="col2" valign="top">
		
		Sentence 
		
	      </entry>
	    </row>

	    <row valign="top">
	      <entry colname="col1" align="left" valign="top">
		
		Webpage titles and navigational elements 
		
	      </entry>
	      <entry colname="col2" valign="top">
		
		Header 
		
	      </entry>
	    </row> 
	  </tbody> 
	</tgroup> 
      </table> 
	 <note><title>Capitalization guidelines for other languages</title>
	<para>Languages other than English may have different rules about capitalization.  For example, Swedish has no concept of Header capitalization. Contact the <ulink url="http://developer.gnome.org/projects/gtp/contact.html">GNOME Translation Project</ulink> if you are in doubt about how to capitalize labels in a particular language.</para>
	</note>

    </sect2>
  </sect1>

  <sect1 id="design-fonts">
    <title>Fonts</title>
    <para>Only use the fonts that the user has specified in their theme, and in sizes relative to the default size specified in their theme.  This will ensure maximum legibility and accessibility for all users.</para>
    <para>Do not mix more than two or three font sizes and styles (underlined, bold, italicized) in one window, as this will look unprofessional and distract the user from the information being conveyed.</para>
    <para>Provide alternatives to WYSIWYG where applicable. Some users may need to print text in a small font but edit in a larger screen font, for example. Possible alternatives include displaying all text in the same font and size (both of which are chosen by the user); a &quot;wrap-to-window&quot; option that allows you to read all the text in a window without scrolling horizontally; a single column view that shows the window's contents in a single column even if they will be printed in multiple columns; and a text-only view, where graphics are shown as placeholders or text descriptions.</para>
  </sect1>
  </chapter>
