mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
#12434 add GUI debug messages for pinch-to-zoom gesture
This commit is contained in:
parent
7134ebd793
commit
22045e455a
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user