|
Packit |
1470ea |
|
|
Packit |
1470ea |
xmlns:uix="http://projectmallard.org/experimental/ui/"
|
|
Packit |
1470ea |
type="topic"
|
|
Packit |
1470ea |
id="header-bar-menus">
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<info>
|
|
Packit |
1470ea |
<link type="guide" xref="patterns#primary"/>
|
|
Packit |
1470ea |
<desc>Common menus shown on the right side of a header bar</desc>
|
|
Packit |
1470ea |
<credit type="author">
|
|
Packit |
1470ea |
<name>Allan Day</name>
|
|
Packit |
1470ea |
<email>aday@gnome.org</email>
|
|
Packit |
1470ea |
</credit>
|
|
Packit |
1470ea |
<include href="legal.xml" xmlns="http://www.w3.org/2001/XInclude"/>
|
|
Packit |
1470ea |
</info>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<title>Header bar menus</title>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<media type="image" mime="image/svg" src="figures/patterns/header-bar-menu.svg"/>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<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.
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
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.
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
In this way, the header bar menus help to create focused views that guide the user towards the most interesting and useful functionality.
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<section id="when-to-use">
|
|
Packit |
1470ea |
<title>When to use</title>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
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.
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
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.
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
</section>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<section id="guidance">
|
|
Packit |
1470ea |
<title>Guidance</title>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<list>
|
|
Packit |
1470ea |
<item>Header bar menus should only contain actions for the current view or window - this differentiates their content from application menus. </item>
|
|
Packit |
1470ea |
<item>Follow the <link xref="menus">standard guidelines for menus</link>. </item>
|
|
Packit |
1470ea |
<item>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. </item>
|
|
Packit |
1470ea |
<item>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. </item>
|
|
Packit |
1470ea |
</list>
|
|
Packit |
1470ea |
|
|
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/GtkMenuButton.html">GtkMenuButton</link> </item>
|
|
Packit |
1470ea |
<item><link href="https://developer.gnome.org/gtk3/stable/GtkPopoverMenu.html">GtkPopoverMenu</link> </item>
|
|
Packit |
1470ea |
</list>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
</section>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
</page>
|