This site has been retired. For up to date information, see handbook.gnome.org or gitlab.gnome.org.


[Home] [TitleIndex] [WordIndex

Zooming

Zooming allows the size and number of items being displayed to be adjusted.

Tags

zoom, scale, image, slider, combobox

Status

Experimental : If you use this pattern, you may have to remove or replace it in a future release of your software to remain consistent with other GNOME applications.

When to Use

Zooming can be used to enlarge images and documents to aid viewing or to increase the number of pages displayed when viewing a multi-page document. It can also be used in order to change the number of items displayed in a viewing area.

Description

Zoom controls can consist of menu items and/or graphical controls. They typically consist of actions to increase and decrease the zoom level as well as a number of automatically adjusted zoom levels, such as 'Best Fit' or 'Fit Page Width'. Zoom menu items should be placed in the View menu.

Guidelines

buttons.png

This arrangement is excellent for a wide range of scenarios and is appropriate appropriate for cases where there is no maximum or minimum zoom level.

slider.png

Sliders can enable finer grained control of the zoom level, though they need to be carefully implemented (see Specification) This kind of control is appropriate for cases where the zoom level has predefined maximum and minimum levels.

combo.png

Displaying the zoom level as a percentage is appropriate for professional image editing software, but is otherwise not recommended.

menu.png

Zoom menu entries should be placed within the View menu.

Current Usage

Nautilus, EOG, F-spot, Evince.

User Guide

To zoom in or out of the image using the toolbar, do one of the following:

To zoom in or out of the image using the mouse, move the mouse pointer to the area of the image on which you wish to zoom. Then:

Keyboard Navigation

To zoom in or out of the image using the keyboard, do one of the following:

Toolbars

Specification

Set a useful default zoom level, such as Best Fit.

Zoom Factor

Do not use a fixed set of available zoom factors, since this causes the zoom level to "jump" in a dramatic and uneven fashion.

http://live.gnome.org/User Interface Patterns/Zooming?action=AttachFile&do=get&target=zoom-concha.gif

Instead, change the zoom level gradually by multiplying or dividing the current zoom level by a constant factor. For example, if you start at 1.0x and make the constant factor be 1.05, then your successive zoom levels would be:

1.05^1
1.05^2
1.05^3
1.05^4
etc.

Choosing the correct factor is a matter of experimentation. Eye of Gnome uses a factor of 1.05, which is comfortable when a mouse's scrollwheel is used to zoom up and down. This factor should be chosen so that the change between successive levels is not too big nor too small. The following example shows successive zoom levels, each with 1.2x multiplication. Note how each level appears to "zoom in the same amount", instead of some steps seeming bigger than others.

http://live.gnome.org/User Interface Patterns/Zooming?action=AttachFile&do=get&target=zoom-even-concha.gif

Point of Transformation

When zooming with the mouse, make sure the fixed point of the transformation is at the mouse cursor, so the user can retain his point of focus on the zoomed image.

http://live.gnome.org/User Interface Patterns/Zooming?action=AttachFile&do=get&target=zoom-fixed-point.png

Source Code

Sample implementation in Eye of Gnome's eog/src/eog-scroll-view.c:compute_center_zoom_offsets().

Toolbars

Change Log

2010-10-08

FedericoMenaQuintero

Add the summary recommendations.

2010-10-08

FedericoMenaQuintero

Add example image for fixed point zooming.


CategoryUsability


2024-10-23 11:03