diff options
Diffstat (limited to 'src/dolphinview.cpp')
| -rw-r--r-- | src/dolphinview.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/dolphinview.cpp b/src/dolphinview.cpp index 7d3fea96a..3fec8fdfb 100644 --- a/src/dolphinview.cpp +++ b/src/dolphinview.cpp @@ -537,6 +537,20 @@ void DolphinView::mouseReleaseEvent(QMouseEvent* event) QWidget::mouseReleaseEvent(event); setActive(true); } + +void DolphinView::wheelEvent(QWheelEvent* event) +{ + if ((event->modifiers() & Qt::ControlModifier) == Qt::ControlModifier) { + int d = event->delta(); + if (d > 0 && isZoomInPossible()) { + zoomIn(); + } else if (d < 0 && isZoomOutPossible()) { + zoomOut(); + } + event->accept(); + } +} + void DolphinView::activate() { setActive(true); |
