1. mst
  2. ooo340

Commits

hdu  committed c3b07a0

#i107076# device DPI also gets a maximum limit

  • Participants
  • Parent commits 56e7427
  • Branches default

Comments (0)

Files changed (1)

File vcl/aqua/source/gdi/salgdi.cxx

View file
             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;