Blame hig/C/check-boxes.page

Packit 1470ea
Packit 1470ea
      xmlns:uix="http://projectmallard.org/experimental/ui/"
Packit 1470ea
      type="topic"
Packit 1470ea
      id="check-boxes">
Packit 1470ea
Packit 1470ea
  <info>
Packit 1470ea
    <credit type="author">
Packit 1470ea
      <name>Allan Day</name>
Packit 1470ea
      <email>aday@gnome.org</email>
Packit 1470ea
    </credit>
Packit 1470ea
    <credit>
Packit 1470ea
      <name>Calum Benson</name>
Packit 1470ea
    </credit>
Packit 1470ea
    <credit>
Packit 1470ea
      <name>Adam Elman</name>
Packit 1470ea
    </credit>
Packit 1470ea
    <credit>
Packit 1470ea
      <name>Seth Nickell</name>
Packit 1470ea
    </credit>
Packit 1470ea
    <credit>
Packit 1470ea
      <name>Colin Robertson</name>
Packit 1470ea
    </credit>
Packit 1470ea
Packit 1470ea
    <link type="guide" xref="ui-elements"/>
Packit 1470ea
    <uix:thumb mime="image/svg" src="figures/ui-elements/check-boxes.svg"/>
Packit 1470ea
Packit 1470ea
    <include href="legal.xml" xmlns="http://www.w3.org/2001/XInclude"/>
Packit 1470ea
  </info>
Packit 1470ea
Packit 1470ea
<title>Check boxes</title>
Packit 1470ea
Packit 1470ea

Check boxes are used to show or change a setting. Its two states, set and unset, are shown by the presence or absence of a checkmark in the labeled box.

Packit 1470ea
Packit 1470ea
<media type="image" mime="image/svg" src="figures/ui-elements/check-boxes.svg"/>
Packit 1470ea
Packit 1470ea
<section id="guidelines">
Packit 1470ea
<title>Guidelines</title>
Packit 1470ea
Packit 1470ea
<list>
Packit 1470ea
<item>

Clicking a check box should not affect the values of any other controls. It may sensitize, insensitize, hide or show other controls, however.

</item>
Packit 1470ea
<item>

If toggling a check box affects the sensitivity of other controls, place the check box immediately above or to the left of the controls that it affects. This helps to indicate that the controls are dependent on the state of the check box.

</item>
Packit 1470ea
<item>

Use <link xref="writing-style#capitalization">sentence capitalization</link> for check box labels, for example <gui>Use custom font</gui>.

</item>
Packit 1470ea
<item>

Label check boxes to clearly indicate the effects of both their checked and unchecked states, for example, <gui>Show icons in menus</gui>. If the two states of a check box cannot be clearly communicated, consider using two radio buttons instead so both states can be given labels.

</item>
Packit 1470ea
<item>

Avoid negative check box labels, as this can be confusing and hard to understand. <gui>Play alert sound</gui> is better than <gui>Disable alert sound</gui>, for example.

</item>
Packit 1470ea
<item>

Provide an <link xref="keyboard-input#access-keys">access key</link> in all check box labels that allows the user to set or unset the check box directly from the keyboard.

</item>
Packit 1470ea
<item>

If the check box represents a setting in a multiple selection that is set for some objects in the selection and unset for others, show the check box in its mixed state. When a check box is in its mixed state:

Packit 1470ea
<list>
Packit 1470ea
<item>

Clicking the box once should check the box, applying that setting (when confirmed) to all the selected objects.

</item>
Packit 1470ea
<item>

Clicking the box a second time should uncheck the box, removing that setting (when confirmed) to all the selected objects.

</item>
Packit 1470ea
<item>

Clicking the box a third time should return the box to its mixed state, restoring each selected object’s original value for that setting (when confirmed).

</item>
Packit 1470ea
</list></item>
Packit 1470ea
<item>

Label a group of check boxes with a descriptive heading above or to the left of the group.

</item>
Packit 1470ea
<item>

Do not place more than about eight check boxes under the same group heading. If you need more than eight, try to use blank space or heading labels to divide them into smaller groups. Otherwise, consider using a check box list instead— but you probably also need to think about how to simplify your user interface.

</item>
Packit 1470ea
<item>

Try to align groups of check boxes vertically rather than horizontally, as this makes them easier to scan visually. Use horizontal or rectangular alignments only if they greatly improve the layout of the window.

</item>
Packit 1470ea
</list>
Packit 1470ea
</section>
Packit 1470ea
Packit 1470ea
<section id="api-reference">
Packit 1470ea
<title>API reference</title>
Packit 1470ea
Packit 1470ea
<list>
Packit 1470ea
<item>

<link href="https://developer.gnome.org/gtk3/stable/GtkCheckButton.html">GtkCheckButton</link>

</item>
Packit 1470ea
</list>
Packit 1470ea
</section>
Packit 1470ea
Packit 1470ea
</page>