Re: A proposal for units in GTK+



On Mon, Feb 03, 2003 at 03:29:20AM -0500, Havoc Pennington wrote:
<snip>
> There has been some past talk of "abstracting" the standard spacing
> values such as the 12-pixel HIG distance. With this proposal, you
> could probably have GTK_UNITS_STANDARD_GAP() that was the standard
> spacing between two user-visible UI elements. Depending on how many
> high bits you want to use.
<snip>

I think this will eventually prove necessary and better advised.  There is
often talk of using em-based, dpi-based or whatever units, but I don't
think the reasons for these have been well thought out; I know I haven't
gone through it all.  But, here's what I expect:

There will be three ranges of font sizes for which spacings are determined
by different multiples of an em. Right now, the HIG sizes are geared towards
fonts from size 8 (what units?) to size 14. Let's say they assume a font
size that gives 1em = 12px; then the sizes in the HIG are 0.5em, 1em, 1.5em,
and 2em. For any font size from 8 to 14, these em multiples give a nice
appearance.  However, as soon as you select a larger font (say for myopia)
all of spaces larger than an em appear grotesquely disproportionate despite
being proportional to your font.  Select a very small font (say for a PDA),
and the spaces smaller than an em might be too small to allow proper
targeting, focus dashes, etc. You can see the same effect scaling images;
the defining lines get blurry.

So in the small font size range we might want spacings from 1em to 2.5em.
In the large font size range we might spacings 0.2em to 1em.


Or something like this.  As I said, I haven't worked through it.

The Microsoft UI guidelines define, iirc, a Dialog Length Unit (DLU) on
which they base their spacings.  I don't recall the definition offhand.



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