File: header-bar-menus.page

package info (click to toggle)
gnome-devel-docs 3.22.1-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 60,536 kB
  • ctags: 658
  • sloc: xml: 2,480; ansic: 2,228; python: 1,854; makefile: 791; sh: 480; cpp: 131
file content (57 lines) | stat: -rw-r--r-- 2,997 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<page xmlns="http://projectmallard.org/1.0/"
      xmlns:uix="http://projectmallard.org/experimental/ui/"
      type="topic"
      id="header-bar-menus">

  <info>
    <link type="guide" xref="patterns#primary"/>
    <desc>Common menus shown on the right side of a header bar</desc>
    <credit type="author">
      <name>Allan Day</name>
      <email>aday@gnome.org</email>
    </credit>
    <include href="legal.xml" xmlns="http://www.w3.org/2001/XInclude"/>
  </info>

<title>Header bar menus</title>

<media type="image" mime="image/svg" src="figures/patterns/header-bar-menu.svg"/>

<p><link xref="header-bars">Header bars</link> can include a menu which contains actions and options for the current view. These menus are located at the far right side of the header bar.</p>

<p>While the most frequently used actions for a view should be placed directly in the header bar, a header bar menu provides access to lesser-used actions. This ensures that the header bar isn’t overwhelmed with less interesting or useful controls.</p>

<p>In this way, the header bar menus help to create focused views that guide the user towards the most interesting and useful functionality.</p>

<section id="when-to-use">
<title>When to use</title>

<p>Use a header bar menu to present additional actions or options for the current view. They are best used when those actions or options are not used the majority of the time - if there is a set of actions which deserve more prominence in the view, an <link xref="action-bars">action bar</link> might be a better choice.</p>

<p>Header bar menus are not a good choice for performing actions on selected content: when content hasn’t been selected, the menu will contain unhelpful insensitive menu items, and when content has been selected, possible actions will not be advertised. <link xref="selection-mode">Selection mode</link> or <link xref="popovers">popovers</link> are a better choice for this situation.</p>

</section>

<section id="guidance">
<title>Guidance</title>

<list>
<item><p>Header bar menus should only contain actions for the current view or window - this differentiates their content from application menus.</p></item>
<item><p>Follow the <link xref="menus">standard guidelines for menus</link>.</p></item>
<item><p>A header bar menu is contained within a <link xref="popovers">popover</link>. As such, a header bar menu can include a variety of controls, such as groups of buttons.</p></item>
<item><p>Header bar menus shouldn’t include a close menu item, since this action is already provided by the header bar. It can also be ambiguous as to what a close menu item refers to.</p></item>
</list>

</section>

<section id="api-reference">
<title>API reference</title>

<list>
<item><p><link href="https://developer.gnome.org/gtk3/stable/GtkMenuButton.html">GtkMenuButton</link></p></item>
<item><p><link href="https://developer.gnome.org/gtk3/stable/GtkPopoverMenu.html">GtkPopoverMenu</link></p></item>
</list>

</section>

</page>