
2011/7/26 Krzysztof KosiĆski <tweenk.pl@...400...>:
I'm not a fan of adding yet another option - we already have far too many settings for things which are really workarounds for bugs or missing functionality. "Latency skew", "Enable relayout of incomplete sections" (????) and zoom correction factor (this should be available from GDK and on top of that it's not really implemented correctly - it just changes the zoom percentage for the 1:1 zoom button instead of making it so that 100% zoom = physical dimensions).
As far as the latter (zoom correction factor) is concerned, I wasn't aware that gdk provides a way to solve this - thanks for pointing it out. The slider was suggested as a workaround ages ago, if I remember correctly because some commercial program (Adobe Illustrator?) had a similar option.
When you say that this should be available from GDK, I presume you are referring to the functions gdk_screen_(width|height) and gdk_screen_(width|height)_mm? I tried a quick fix based on these which seems to work for me. However, the documentation says: "Note that on many X servers this value will not be correct." Is there something else I could use?
If there isn't and we are stuck with the above functions, I have two more questions:
1) My (possibly kludgy) fix computes the following correction factor:
(gdk_screen_width() / gdk_screen_width_mm() * 25.4) / 90.0
Here 25.4 is the number of millimeters per inch, so that the value in brackets is the number of screen pixels per inch. This is then divided by the "true" value 90.0 pixels per inch to get the correction factor. This seems to work, but I was wondering whether the value 90.0 should be hard-coded or if it is configurable somewhere (I don't know much about screen resolutions, and I seem to remember that there are endless fights about what number of pixels per inch is "correct").
2) When I use the _height functions (instead of _width) I get slightly different correction factors. Should we thus have different scaling factors horizontally and vertically?
Cheers, Max
P.S.: Actually, when testing on a different computer I noticed that at 100% zoom the page width is almost, but not quite correct. This may have to do with item 2) above, though.