macos:Positioning-regular-size-controls-in-a-window-body

出自UXGuide.net

跳转到: 导航, 搜索

Positioning Regular-Size Controls in a Window Body

目录


Although there are many ways to arrange controls in a given window, there are guidelines you should follow so that your application has the clean, balanced Aqua look. This section provides examples of properly designed windows and alerts that use regular-size controls. For guidelines on the use of mini and small controls, see “Using Small and Mini Versions of Controls.” Although some of the guidelines presented in this section are specific to the examples shown, most are general guidelines that are applicable to all windows.

A Simple Preferences Window

Figure 16-1 shows a very simple preferences window. Note that an application with more extensive preferences probably would use a toolbar in the preferences window to provide access to different categories of preferences (see, for example, Figure 14-54).

Figure 16-1 Preferences window example

lyoutappprefexample.jpg

This window provides a good example of a center-equalized layout. Center equalization simply means that the visual weight is balanced on the right and left side of the content area. It does not mean center justification, where the left and right sides of an imaginary vertical line drawn through the center of a window contain exactly the same number of items or characters.

In Mac OS X, content should always be center-equalized in windows and panes. The shading in Figure 16-2 highlights this equalization. Notice that although the right side of the vertical line has more objects, it is balanced by the category labels on the left. The net result is a visually balanced window.

Figure 16-2 Example center-equalization in a preferences window

lyoutappprefcentered.jpg

When labels and controls are stacked in a group, they should line up with each other vertically. When controls are vertically aligned, it helps users see at a glance that the controls are similar in importance and that one control does not depend on another. Of course, if there is a hierarchy of controls in your window and, for example, one control depends on another, you can indent the subordinate control to show its relationship to the control on which it depends. (See Figure 15-24 for an example of interdependent checkboxes.)

Figure 16-3 shows the vertical alignment of controls and labels in a window. Note that the colons for the main category labels are right-aligned, whereas the checkboxes and radio buttons are left-aligned. Right-alignment of the labels makes it easier to see the relationship between each label and the controls it describes.

Figure 16-3 Example label and control alignment in a preferences window

lyoutappprefaligned.jpg

In addition to ensuring that your content is center-equalized and appropriately aligned, it’s also important to use proper spacing in your window. Appropriate spacing not only makes a window look attractive and well-designed, but also makes it much easier for users to understand and use. When the margins inside the window edges and the spaces between user interface elements are adequate and consistent it helps to show the relationships between groups of controls and the overall flow of the window. For more examples of using white space appropriately, see “Grouping With White Space.”

The preferences window used as an example in this section uses white space in a consistent way. For example, in Figure 16-4 you can see:

For the recommended spacing between members in a set of controls, such as between each radio button in a radio-button group, see the section that describes that control.

In addition, the window in Figure 16-4 uses a 14-pixel margin between the top controls and the bottom edge of the title bar (this margin would be the same width if the window contained a toolbar). Also, the controls in the main part of the window are separated from the Help button at the lower edge of the window by an 18-pixel space (a space of at least 16 pixels is recommended).

Figure 16-4 Example layout of a preferences window

lyoutapppref.jpg

A Tabbed Window

A tabbed window, like the one shown in Figure 16-5 follows the same general guidelines as those outlined in “A Simple Preferences Window.” However, it illustrates another implementation of many of the same basic guidelines you’ve seen so far, along with some new guidelines.

Figure 16-5 Tabbed window example

lyouttabdialogsample.jpg

Center-equalization is again evident in Figure 16-6. The overall effect of the window is a balance between the visual weight of the controls on one side of the invisible center axis with the weight of the controls on the other side. The controls are also collectively balanced within each group box so that the distance from the farthest control on each side of the group box is the same for both the right and left sides.

Also as shown in Figure 16-6, always center a tab view within a window.

Figure 16-6 Example of center-equalization in a tabbed window

lyouttabdialogcentered.jpg

Figure 16-7 illustrates a few guidelines about control placement:

Figure 16-7 Example of alignment of labels and controls in a tabbed window

lyouttabdialogalign.jpg

Like the simple preferences window example in “A Simple Preferences Window,” the tabbed window shown in this section uses white space in a consistent way. For example, in Figure 16-8, you can see:

In addition, the window in Figure 16-8 uses a 12-pixel margin between the top of the tab bar to the bottom of the title bar (see “Tab Views” for more information about tab views). Note that this margin would be the same width if the window included a toolbar.

Figure 16-8 Example of layout of a tabbed window

lyouttabdialog.jpg

A Standard Alert

A standard alert is shown in Figure 16-9.

Figure 16-9 A standard alert example

lyoutstandardalertsample.jpg

Although the standard alerts take care of the general layout for you, there are a few details you are responsible for:

Alerts look best when the margin at the bottom edge is the same height as in other windows (for example, in Figure 16-10, this margin is 20 pixels). In addition, you should ensure that there is an equal amount of space in the margins at the sides. The standard alert shown in Figure 16-10 uses a 24-pixel wide margin at the sides of the window.

See “The Elements of an Alert” for more details on designing alerts.

Figure 16-10 Layout of a standard alert

lyoutstandardalert.jpg

A Dialog with a List View

When you need to allow users to view or manipulate a potentially large set of items in a dialog, you can use a list view to display them. (To learn more about using a list view in a window, see “List Views”; to learn about the different types of buttons in a dialog, see “Dismissing Dialogs.”) The layout guidelines in this section differ slightly, depending on whether the dialog displays an icon.

Note: The layout guidelines in this section apply to all dialogs that contain a list view, regardless of the dialog type. See “Dialogs” for more information on the types of dialogs that are available.

To achieve a clean, well-balanced layout of a list view in a dialog that does not contain an icon, follow these guidelines:

Figure 16-11 shows a dialog that does not display any text above the list view. Note that the buttons below the list are aligned with the list’s side edges and that the margins on both sides of the window are equal in width (the dialog in Figure 16-11 uses 20-pixel wide side margins).

Figure 16-11 Example layout of a list view in a dialog without an icon

lyoutlistnoicon.jpg

If you need to display an icon in a dialog with a list view, follow these guidelines:

Figure 16-12 shows an example of how a list view in a dialog with an icon might look. Note that the margins on both sides of the window are equal in width (the dialog in Figure 16-12 uses 20-pixel wide side margins).

Figure 16-12 Example layout of a list view in a dialog with an icon

lyoutlisticon.jpg

个人工具
名字空间
变换
动作
导航
工具箱