diff options
author | don bright <hugh.m.bright@gmail.com> | 2012-07-23 01:56:01 (GMT) |
---|---|---|
committer | don bright <hugh.m.bright@gmail.com> | 2012-07-23 01:56:01 (GMT) |
commit | 86b5fc02f59626df5e627e6cefac5be03c199385 (patch) | |
tree | 443c6bfd053d7082a71d30bfde99a1ab30bf4be1 /src/editor.cc | |
parent | b33a02b372cb1efff5bf6b177a2360e5d5ba87b3 (diff) |
on control + mousewheel, zoomin/zoomout text (like firefox, IE, etc)
Diffstat (limited to 'src/editor.cc')
-rw-r--r-- | src/editor.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/editor.cc b/src/editor.cc index f237c2e..5282677 100644 --- a/src/editor.cc +++ b/src/editor.cc @@ -97,4 +97,14 @@ void Editor::zoomOut() this->setFont( tmp_font ); } +void Editor::wheelEvent ( QWheelEvent * event ) +{ + if (event->modifiers() == Qt::ControlModifier) { + if (event->delta() > 0 ) + zoomIn(); + else if (event->delta() < 0 ) + zoomOut(); + } +} + #endif |