Skip to content

Commit

Permalink
ticket:4349 Take smaller steps for zooming.
Browse files Browse the repository at this point in the history
Also set the minimum zoom to readable size.
  • Loading branch information
adeas31 committed Mar 20, 2017
1 parent 32ed136 commit d8df3ca
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions OMEdit/OMEditGUI/Modeling/DocumentationWidget.cpp
Expand Up @@ -1303,9 +1303,16 @@ void DocumentationViewer::wheelEvent(QWheelEvent *event)
{
if (event->orientation() == Qt::Vertical && event->modifiers().testFlag(Qt::ControlModifier)) {
qreal zf = zoomFactor();
zf += event->delta()/120.;
if (zf > 5.) zf = 5.;
if (zf < .1) zf = .1;
/* ticket:4349 Take smaller steps for zooming.
* Also set the minimum zoom to readable size.
*/
if (event->delta() > 0) {
zf += 0.1;
zf = zf > 5 ? 5 : zf;
} else {
zf -= 0.1;
zf = zf < 0.5 ? 0.5 : zf;
}
setZoomFactor(zf);
} else {
QWebView::wheelEvent(event);
Expand Down

0 comments on commit d8df3ca

Please sign in to comment.