GUI builders considered harmful (Was: anygui, anydb, any opinions?)

Neil Hodgson nyamatongwe+thunder at
Mon Jun 6 04:55:15 CEST 2005

Mike Meyer:

> The obvious solution would be for the system to detect all these
> environmental factors, and scale the applications
> accordingly. However, things like viewing distance and the quality of
> my eyesight are hard to detect automatically, and it would be a pain
> to have to enter all those things manually. Since the end result of
> all these is a single factor - a UI scale factor - a system wide knob
> to scale applications would seem to be the solution.

    Treating scalability as a matter of magnification is problematic. 
User interfaces consist of a mixture of smoothly magnifiable and 
discrete aspects. Pixels are discrete (well, almost) and sometimes, such 
as at the edge of a button, you need to be able to control whole pixels 
to ensure that you get a visible transition rather than a blur. Text is 
often unreadable under a certain size so that places a lower bound under 
magnification. Often when scaling down, you want to remove elements or 
move them onto extra pages or pop-ups. This sort of change generally 
requires human intelligence.

    The toolkit I am most familiar that does try to be magnifiable is 
Windows.Forms and it is also my least favourite currently having 
particularly ugly text. To achieve resolution independence Windows.Forms 
(and the underlying GDI+) uses sub-pixel positioning as do other recent 
rendering libraries. This leads to the possibility of each render of a 
particular character being different. For example, in a text editor, if 
the font height is 10.5 pixels then two assignment lines
x = 1
y = 0
    may display the first '=' legibly with one black line, one white 
line and another black line but the second line, offset by .5 pixels 
will show a 4 pixel high grey rectangle. Forcing the '=' onto the pixel 
grid will distort the text appearance.


More information about the Python-list mailing list