Re: [Usability] GtkEntry with units

On 1/21/07, Matthew Paul Thomas <mpt myrealbox com> wrote:
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

The option menu was my intuitive first thought as well, but I'm a bit
concerned it may not work out very well when the GtkEntry is stretched
to fit the overall dialog layout:
------------------------- --------
|123                     | cm <> |
------------------------- --------
|123cm                           |
where the latter would look much more natural.

Maybe a GtkEntryCompletion or GtkComboBoxEntry could be used to allow
for numeric and unit input in the same GtkEntry. That way the allowed
unit abbreviations can just typed straight away or alternatively
selected from the dropdown.
|123cm                         <>|
Saving the extra widget would make dialogs look simpler (also
GtkComboBox that's now preferred over the deprecated GtkOptionMenu
takes up a lot of space for padding to make the dropdown-arrow easy to

What do you think?

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