mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 05:25:26 +00:00
parent
65394e1907
commit
7134ebd793
@ -1632,8 +1632,11 @@ bool GuiView::event(QEvent * e)
|
||||
if (gp) {
|
||||
QPinchGesture *pinch = static_cast<QPinchGesture *>(gp);
|
||||
QPinchGesture::ChangeFlags changeFlags = pinch->changeFlags();
|
||||
if (pinch->state() == Qt::GestureStarted) {
|
||||
initialZoom_ = lyxrc.currentZoom;
|
||||
}
|
||||
if (changeFlags & QPinchGesture::ScaleFactorChanged) {
|
||||
qreal factor = lyxrc.currentZoom*pinch->scaleFactor();
|
||||
qreal factor = initialZoom_ * pinch->totalScaleFactor();
|
||||
zoomValueChanged(factor);
|
||||
}
|
||||
}
|
||||
|
@ -526,6 +526,9 @@ private:
|
||||
|
||||
// developer mode
|
||||
bool devel_mode_;
|
||||
|
||||
// initial zoom for pinch gesture
|
||||
int initialZoom_;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user