Re: [Usability] GtkEntry with units



On Jan 17, 2007, at 4:19 AM, Robert Staudinger wrote:
...
over at the abiword assembly line we're using a lot of GtkEntry
widgets for displaying the size of stuff like page width/height, table
cell size ... There is no recommendation how to handle a size with units in the HIG. Well there is [1], somewhat related but not quite.

So:
+ How to display a size with unit in a GtkEntry? Just append the unit
part? Put the unit part outside the GtkEntry like [1]?

I think the answer to this is "it depends". If you can expect people to know what sort of units are available (probably true for page sizes, maybe not for cell sizes if they can be percentages), and how to type them (probably not true for angle measurements, for example), then you can make the units part of the entered text inside the field. Otherwise, you can provide an option menu of possible units next to the number field, like the Gimp does in its various dialogs for sizing images.

+ How to edit a size with unit? This obviously depends on the previous
question. Should used units be changeable per GtkEntry? per App?
global Desktop setting like LC_NUMERIC?

I think it would be reasonable to allow multiple units -- e.g. for a cell, height in ems and width in centimetres. If using a single field and a number is entered with no units, assume it's the same units as used for other dimensions of the same thing (if there are any), otherwise a global desktop setting if available. Fill in the guessed units when focus leaves the field.

Should the unit be entered in "plain text" or using a dropdown? How is the current unit displayed while editing is in progress? Can it be overwritten?
...

If you take the route of using an option menu of possible units, one thing you might try is automatically switching focus from the field to the menu if a non-numeric character is entered, and from the menu to the field if a numeric character is entered. That way, no matter which of the two controls is focused initially, someone can type something like "8.25 inches" and it will do the right thing.

Cheers
--
Matthew Paul Thomas
http://mpt.net.nz/




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]