commit 22045e455aeb1ecec4507331e4e171bdf21c116d
Author: Stephan Witt <[email protected]>
Date: Sun Jan 9 12:29:02 2022 +0100
#12434 add GUI debug messages for pinch-to-zoom gesture
---
src/frontends/qt/GuiView.cpp | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/src/frontends/qt/GuiView.cpp b/src/frontends/qt/GuiView.cpp
index 91e8229..5cf4fce 100644
--- a/src/frontends/qt/GuiView.cpp
+++ b/src/frontends/qt/GuiView.cpp
@@ -1632,11 +1632,15 @@ bool GuiView::event(QEvent * e)
if (gp) {
QPinchGesture *pinch = static_cast<QPinchGesture *>(gp);
QPinchGesture::ChangeFlags changeFlags =
pinch->changeFlags();
+ qreal totalScaleFactor = pinch->totalScaleFactor();
+ LYXERR(Debug::GUI, "totalScaleFactor: " <<
totalScaleFactor);
if (pinch->state() == Qt::GestureStarted) {
initialZoom_ = lyxrc.currentZoom;
+ LYXERR(Debug::GUI, "initialZoom_: " <<
initialZoom_);
}
if (changeFlags & QPinchGesture::ScaleFactorChanged) {
- qreal factor = initialZoom_ *
pinch->totalScaleFactor();
+ qreal factor = initialZoom_ * totalScaleFactor;
+ LYXERR(Debug::GUI, "scaleFactor: " << factor);
zoomValueChanged(factor);
}
}
--
lyx-cvs mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-cvs