Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Apple Human Interface Guidelines.pdf
Скачиваний:
13
Добавлен:
27.03.2015
Размер:
29.57 Mб
Скачать

C H A P T E R 1 5

Controls

The standard Help button is available in Interface Builder. To create a Help button using Application Kit programming interfaces, use the setBezelStyle: method of NSButtonCell with

NSHelpButtonBezelStyle as the argument.

Bevel Buttons

A bevel button is a multipurpose button designed for use in the window-body area. You can use bevel buttons singly (as a push button) or in groups (as a set of radio buttons or checkboxes). Figure 15-17 shows bevel buttons used as push buttons in the Preview inspector window.

Figure 15-17 Bevel buttons in an inspector window

Bevel buttons

Bevel buttons can have square or rounded corners. The square-cornered variation can be used when space is limited or when adjoining a set of bevel buttons. You may notice, however, that bevel buttons are not very frequently used in applications running in Mac OS X v10.4 and later. This is due in part to user interface style changes and in part to alternative controls that became available. You can still use bevel buttons if they provide exactly the look you need, but you should consider alternatives, such as gradient buttons and segmented controls (described in “Gradient Buttons” (page 265) and “Segmented Controls” (page 277), respectively).

Bevel Button Usage

Bevel buttons can behave like push buttons or can be grouped and used like radio buttons or checkboxes. For example, you could use bevel buttons to graphically represent text-alignment options.

Use bevel buttons in the window body. If you need a similarly versatile button for use in the window-frame areas, consider using a rectangular-style toolbar button (described in “Controls for Toolbars and Bottom Bars” (page 250)).

Buttons

269

2008-06-09 | © 1992, 2001-2003, 2008 Apple Inc. All Rights Reserved.

C H A P T E R 1 5

Controls

Bevel Button Contents and Labeling

Bevel buttons are very versatile and can display text, icons, or other images. Bevel buttons can also display a single downward-pointing arrow in addition to text or an image, which indicates the presence of a pop-up menu. See “Icon Buttons and Bevel Buttons With Pop-Up Menus” (page 279) for more information about this usage.

If you choose to display an icon or image instead of a text label, be sure the meaning of the image is clear and unambiguous (see “Cultural Values” (page 47) for some advice on choosing appropriate imagery). Interface Builder provides several built-in images you can use on a bevel button; see “System-Provided Images” (page 151) for more information about system-provided images.

You can also combine an icon (or image) and a text label on a bevel button. You can place the text anywhere on the button in relation to the icon (you specify the location in Interface Builder or programmatically). Use label font (10-point Lucida Grande Regular) for text labels.

If you use a bevel button as a push button, its label should be a verb or verb phrase that describes the action it performs. If you provide a set of bevel buttons to be used as radio buttons or checkboxes, you might label each with a noun that describes a setting or a value.

Bevel Button Specifications

Control sizes: The dimensions of bevel buttons vary; 20 x 20 pixels is the recommended size for use in a tool panel (see “Panels” (page 222) for more information on panels).

Icon sizes: 32 x 32 pixels is the largest recommended icon size. Maintain a margin of between 5 and 15 pixels between the icon and the outer edges of the button. A button that contains an icon and label combined may need a margin around the edge that’s closer to 15 pixels than to 5 pixels.

Control spacing: For bevel buttons with rounded corners that contain a 24 x 24 pixel (or larger) icon, leave at least 8 pixels between buttons, stacked vertically or aligned horizontally. Otherwise, buttons should butt up against each other.

Figure 15-18 shows some examples of these configurations.

Figure 15-18 Bevel button examples

Rounded corners

32 x 32

Leave at least 5 pixels between edge of icon and edge of button.

Rounded corners with label below icon

32 x 32

Label

58 x 57

Bevel button as a push button

270 Buttons

2008-06-09 | © 1992, 2001-2003, 2008 Apple Inc. All Rights Reserved.

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]