Re: widget size independant to screen resolution

Phil <[email protected]> Tue, 19 Oct 2004 22:33:51 +0000
Newsgroups gmane.comp.graphics.y.devel
Message-ID <[email protected]>
Ben Urban wrote:
> I have a number of interesting points to make:
> * It may be beneficial to have a control panel (or part of one)
> dedicated to allowing the user to specify the correct PPI setting for
> his/her monitor and resolution, such as the way the GIMP handles it (by
> allowing manual specification and a calibration dialog).  Unlike the
> GIMP, this would have to be a desktop-wide setting, rather than an
> individual application setting.

VESA DDC (and for DVI machines the DVI protocol) report the physical 
dimensions of the VDU in extremely precise terms.  There is no need to 
bother with a user-settable value.

> * It could automatically adjust the PPI setting when changing
> resolutions.

Well, of course.  However, I think it would be best measured in 
pixels-per-metre.  It's both more metric and more amenable to being 
stored as an unsigned integer value.  My screen has around 4000 p/m, 
which means that a uint32_t ought to be good enough for pretty much 
forever -- at a reasonable distance from the screen I have trouble 
picking out individual pixels anyway. The highest density screen I know 
of today is 8000 p/m*, and I had trouble seeing those pixels with a 
magnifying glass.  Since horizontal- and vertical-density usually 
differ, a pair of values is the right way to store this data.

I'll add it to my todo list.

> * It must be made clear that applications are to use the scaling factor
> pixels unless an accurate ruler is absolutely necessary

Well, applications should certainly respect the user's preference for 
relative widget size (relative to whatever 'normal' widget size is).

> , and that an
> application is not to use pure pixels at all.  In fact, pure pixels do
> not even have to be made available to applications (or even widgets). 
> Isn't abstraction fun? :)

This is probably the worst idea I've heard on this list. On my screen, I 
would want things to be ~1.25 times the pixel dimensions they are on 
Mark's desktop -- mostly because I am short sighted. Say, for instance, 
that Mark takes a screenshot of his desktop to show me something.  There 
is absolutely no way to abstract pixels away so that when that image is 
rescaled to 1.25 it's original pixel dimensions on my machine it doesn't:
(a) look absolutely crap,
(b) take ages to render, or
(c) both of the above.

Phil

* Actully, I know of some up in the 32000s -- but they don't allow 
individual pixels to be addressed.