summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorJoren De Cuyper <jorendc@libreoffice.org>2014-02-25 23:10:44 +0100
committerNorbert Thiebaud <nthiebaud@gmail.com>2014-03-05 09:22:14 -0600
commit644dbbc9d0098c02c8a1edd7d12daf13edca7eda (patch)
treebb7c7e868f99c13231e2d20099cedb616210b033 /vcl
parent160d289564428c458f4923fe2eb5bfe28c3c61a7 (diff)
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 <nthiebaud@gmail.com> Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/osx/salframeview.mm4
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/osx/salframeview.mm b/vcl/osx/salframeview.mm
index e52195732cae..e556bf38bb35 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;