vcl/osx/salframeview.mm |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 644dbbc9d0098c02c8a1edd7d12daf13edca7eda
Author: Joren De Cuyper <jore...@libreoffice.org>
Date:   Tue Feb 25 23:10:44 2014 +0100

    Switch to -magnification instead of -deltaZ for mac osx pinch-to-zoom
    
    Using pinch-to-zoom in LibreOffice result in following warning in terminal:
    soffice[2376:507] -deltaZ is deprecated for NSEventTypeMagnify.  Please use 
-magnification.
    
    Following 
https://groups.google.com/a/chromium.org/forum/#!topic/chromium-reviews/lMxCG03aZNs
    -deltaZ is deprecated since OSX 10.6. Therefore use -magnification. The 
forum also
    mentions the fact the steps are 500 times smaller. Lets use this factor 500 
to keep the
    behavior as consistent as possible
    
    Change-Id: Ie769c518492e5b149a5301b19cae8d841047cb22
    Reviewed-on: https://gerrit.libreoffice.org/8345
    Reviewed-by: Norbert Thiebaud <nthieb...@gmail.com>
    Tested-by: Norbert Thiebaud <nthieb...@gmail.com>

diff --git a/vcl/osx/salframeview.mm b/vcl/osx/salframeview.mm
index e521957..e556bf3 100644
--- a/vcl/osx/salframeview.mm
+++ b/vcl/osx/salframeview.mm
@@ -765,11 +765,11 @@ private:
 
         if( bNewSeries )
             mfMagnifyDeltaSum = 0.0;
-        mfMagnifyDeltaSum += [pEvent deltaZ];
+        mfMagnifyDeltaSum += [pEvent magnification];
 
                mfLastMagnifyTime = [pEvent timestamp];
                // TODO: change to 0.1 when COMMAND_WHEEL_ZOOM handlers allow 
finer zooming control
-               static const float fMagnifyFactor = 0.25;
+               static const float fMagnifyFactor = 0.25*500;
         static const float fMinMagnifyStep = 15.0 / fMagnifyFactor;
         if( fabs(mfMagnifyDeltaSum) <= fMinMagnifyStep )
             return;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to