X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/d432679df0c7a4bcba210fed69df0699c1de12c0..9a8f75e93cbddca787cbfea8d27ed60009a44512:/src/dolphinview.cpp 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);