┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/views/dolphinview.cpp
diff options
context:
space:
mode:
authorVishesh Yadav <[email protected]>2011-08-30 18:16:27 +0530
committerVishesh Yadav <[email protected]>2011-08-30 18:16:27 +0530
commit7c99bf5f6b6285c47dc4fa90d2bd2425287747d5 (patch)
tree6891ca8a594379c8af1e12c74f688dfcb47e422c /src/views/dolphinview.cpp
parent8a5cf061e1ee091270386db0b006dbbe3865bd79 (diff)
DolphinView zoom with CTRL+MouseWheel REVIEW: 102490
Diffstat (limited to 'src/views/dolphinview.cpp')
-rw-r--r--src/views/dolphinview.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp
index 099140177..d00c5c077 100644
--- a/src/views/dolphinview.cpp
+++ b/src/views/dolphinview.cpp
@@ -684,6 +684,17 @@ void DolphinView::contextMenuEvent(QContextMenuEvent* event)
}
}
+void DolphinView::wheelEvent(QWheelEvent* event)
+{
+ if (event->modifiers().testFlag(Qt::ControlModifier)) {
+ const int numDegrees = event->delta() / 8;
+ const int numSteps = numDegrees / 15;
+
+ setZoomLevel(zoomLevel() + numSteps);
+ }
+ event->accept();
+}
+
void DolphinView::activate()
{
setActive(true);