vcl-osx fix: 'NSEvent' may not respond to '-magnification'
(error: invalid operands of types 'float' and 'objc_object*' to binary 'operator+') Change-Id: Iade7acde31fad21d7dde1a8c20c8900d9cbbd446 Reviewed-on: https://gerrit.libreoffice.org/8792 Tested-by: Norbert Thiebaud <nthiebaud@gmail.com> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
This commit is contained in:
parent
c2ed5f000e
commit
f8f28ae91d
@ -765,11 +765,19 @@ private:
|
||||
|
||||
if( bNewSeries )
|
||||
mfMagnifyDeltaSum = 0.0;
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
|
||||
mfMagnifyDeltaSum += [pEvent deltaZ];
|
||||
#else
|
||||
mfMagnifyDeltaSum += [pEvent magnification];
|
||||
#endif
|
||||
|
||||
mfLastMagnifyTime = [pEvent timestamp];
|
||||
// TODO: change to 0.1 when COMMAND_WHEEL_ZOOM handlers allow finer zooming control
|
||||
static const float fMagnifyFactor = 0.25*500;
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
|
||||
static const float fMagnifyFactor = 0.25;
|
||||
#else
|
||||
static const float fMagnifyFactor = 0.25*500; // steps are 500 times smaller for -magnification
|
||||
#endif
|
||||
static const float fMinMagnifyStep = 15.0 / fMagnifyFactor;
|
||||
if( fabs(mfMagnifyDeltaSum) <= fMinMagnifyStep )
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user