mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -04:00
Make forward and backward mouse buttons turn pages
This commit is contained in:
parent
dcb7e6e0c6
commit
d20958c14f
@ -1062,14 +1062,30 @@ void Viewer::mousePressEvent(QMouseEvent *event)
|
||||
xDragOrigin = event->x();
|
||||
setCursor(Qt::ClosedHandCursor);
|
||||
event->accept();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void Viewer::mouseReleaseEvent(QMouseEvent *event)
|
||||
{
|
||||
if (event->button() == Qt::LeftButton) {
|
||||
drag = false;
|
||||
setCursor(Qt::OpenHandCursor);
|
||||
event->accept();
|
||||
return;
|
||||
}
|
||||
|
||||
if (event->button() == Qt::ForwardButton) {
|
||||
right();
|
||||
event->accept();
|
||||
return;
|
||||
}
|
||||
|
||||
if (event->button() == Qt::BackButton) {
|
||||
left();
|
||||
event->accept();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void Viewer::updateZoomRatio(int ratio)
|
||||
|
Loading…
Reference in New Issue
Block a user