Window Scaling (was Re: Questions about IDE and perhaps Win32Lib)

new topic     » topic index » view thread      » older message » newer message

Ray Tomes wrote:
> 3. In Win32Lib a control can be declared as EITHER a number of pixels OR 
> a proportion of the parent size e.g. .25 for a quarter. I tried to do 
> this also in IDE but it didn't work. Is it possible to do this in IDE?
> 
> My problem is that I am designing for a 1024x768 screen size but want to 
> be able to have it work on any screen size and for everything to scale 
> correctly. I don't mind calculating the correct font sizes etc myself.

It seems from the answers to my questions that there is no generally 
accepted way of dealing with this particular issue.

Frankly, to write typical complex programs that will run on a variety of 
computers it is essential to have proper window scaling.

So I throw in a few more random thoughts...

A perfectly scalable grid system for popular screen sizes.

             Suggested system      Possible alternative
            --------------------- ---------------------
Screen      Grid     No. of     |    Grid    No. of   |  Possible
Size        Size     Units      |    Size    Units    |  Font Size

640x480      20      32x24      |     10     64x48    |     8
800x600      25      32x24            does not fit    |    10
1024x960     32      32x24      |     16     64x48    |    13 (12.8)
1280x960     40      32x24      |     20     64x48    |    16
1600x1200    50      32x24      |     25     64x48    |    20

The above table shows how it is possible to design a grid with 32x24 units 
that will fit the most popular screen resolutions. If 800x640 is 
sacrificed then a more detailed grid of 64x48 units can be used, though 
this is probably not necessary.

This grid of 32x24 units is quite a nice size as a typical button is 2x1 
or maybe 3x1 units (giving 64x32 or 96x32 pixels on a 1024x768 screen).

------------------------------
|     |     |     |     |    You can design buttons to fit say 2 or 3
|     |     |     |     |    adjacent horizontal grid units.
|     |     |     |     |    It scales perfectly.
------------------------------
|     |     |     |     |    The grid has 32 units across and is 24
|     |     |     |     |    units deep. The size of each unit depends
|     |     |     |     |    on screen size, ranging from 20 pixels on
---------------------------- 640x480 to 50 pixels on 1600x1200.
|     |     |     |     |


As you can see, the font sizes proportionality works out quite well also, 
with the one exception that on the 1024x768 screen the font might need 
rounding to 13 from 12.8 as calculated.

What is the point of all this you might ask?

Well, if you design a nice looking window on a 800x600 screen and someone 
else runs it on a 1280x960 screen then they are going to ask you for a 
microscope because they cannot see the tiny writing on the tiny buttons.

So I want to be able to make a program that has perfectly scalable 
windows, right down to the buttons and fonts, so that when the window is 
stretched or if the user just does open full screen, everything looks the 
same, only larger or smaller. Of course the writing on the buttons must 
fit at all sizes, not just the one that it was designed on.

It is possible to do this as an after process to IDE generating a program, 
but ideally it should be integrated into IDE.

If anyone doesn't think this is essential in a system to be distributed 
widely then I would like to know how they deal with different screen sizes 
used by different users.

Ray

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu