diff options
author | Herbert Duerr <hdu@openoffice.org> | 2009-11-24 08:00:19 +0000 |
---|---|---|
committer | Herbert Duerr <hdu@openoffice.org> | 2009-11-24 08:00:19 +0000 |
commit | 9d63153784cc630907fa0e4347e4cb922f0eb74d (patch) | |
tree | 9c8e3928ee4ffc9c209172b578b8e15e755272b7 | |
parent | 972c78c8869ee4e786ca37d9570b00edb1820f23 (diff) |
#i107076# device DPI also gets a maximum limit
-rw-r--r-- | vcl/aqua/source/gdi/salgdi.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/vcl/aqua/source/gdi/salgdi.cxx b/vcl/aqua/source/gdi/salgdi.cxx index f94c346caa71..1c9bdda3fbdb 100644 --- a/vcl/aqua/source/gdi/salgdi.cxx +++ b/vcl/aqua/source/gdi/salgdi.cxx @@ -404,11 +404,15 @@ void AquaSalGraphics::initResolution( NSWindow* pWin ) DBG_ERROR( "no screen found" ); } - // #i107076# maintaining size-WYSIWYG-ness causes many problems for low resolution devices - // or for mis-reporting devices => it is better to use a default resolution then + // #i107076# maintaining size-WYSIWYG-ness causes many problems for + // low-DPI, high-DPI or for mis-reporting devices + // => it is better to limit the calculation result then static const int nMinDPI = 72; if( (mnRealDPIX < nMinDPI) || (mnRealDPIY < nMinDPI) ) mnRealDPIX = mnRealDPIY = nMinDPI; + static const int nMaxDPI = 200; + if( (mnRealDPIX > nMaxDPI) || (mnRealDPIY > nMaxDPI) ) + mnRealDPIX = mnRealDPIY = nMaxDPI; // for OSX any anisotropy reported for the display resolution is best ignored (e.g. TripleHead2Go) mnRealDPIX = mnRealDPIY = (mnRealDPIX + mnRealDPIY + 1) / 2; |