Re: widget size independant to screen resolution
Ben Urban <[email protected]> Tue, 19 Oct 2004 12:45:01 -0400
| Newsgroups | gmane.comp.graphics.y.devel |
|---|---|
| Organization | Simply Computers, Inc. |
| Message-ID | <1098204301.5746.1.camel@localhost> |
On Mon, 2004-10-18 at 22:37, William Lahti wrote: > Screen resolution is *not* meant to change the size of your desktop. > Screen resolution is intended to increase quality as resolution gets > higher. This means that widgets should be drawn the same size no > matter what resolution your in. This fits in nicely with your slider > idea (which I also thought of when working on my own graphics > project). > > By doing this, you need to stop applications from specifying sizes in > pixels. Pixels are low-level units and should never be needed by > standard applications. You could however specify a 'virtual pixel' > unit which splits the screen into 640x480 units (no matter what > resolution). Such a mapping would allow people to have the familiarity > of pixels and still support resolution independence. > > In the past (and present) people thought that since people with larger > screens can have larger resolutions, the widgets end up being the same > size. This is ignorant, as most monitors support at least two > different resolutions. > > I think all modern toolkits should have unit measurement built in. > That is to say that the programmer can input measurements in many > different units. These units are automatically converted to pixels. > Because the underlying system performs the translation, you can > support not only static PPIs for each resolution (pixels per inch o' > course) but you can also gather such PPI information from the hardware > if it makes it available. This would allow a windowing system to > display an inch as exactly an inch. > > [Snip] 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. * It could automatically adjust the PPI setting when changing resolutions. * I would recommend that this setting be independent of the scaling factor discussed in this thread, as some programs may need accurate ruler measurements (print preview functionality comes to mind). * Also, I don't think it would be wise to ask the user to specify this setting (or the scale factor, for that matter) upon the initial run of the windowing system (the way the GIMP does). An option like that would probably best be handled later (assuming sensible defaults are used). * It must be made clear that applications are to use the scaling factor pixels unless an accurate ruler is absolutely necessary, 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? :) * An application that needs the PPI setting could inform the user if he/she has not already set it, and give the user the option to enter the control panel to do so.