Help viewer: Add option for scroll wheel zooming

Fixes: QTCREATORBUG-14154
Change-Id: Ia6c4aedb78954614477f0228ba82c4dc476a2525
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Eike Ziller
2019-02-15 15:30:52 +01:00
parent 9e965409d1
commit 334c76fd31
12 changed files with 90 additions and 11 deletions

View File

@@ -406,16 +406,6 @@ bool TextBrowserHelpWidget::eventFilter(QObject *obj, QEvent *event)
return QTextBrowser::eventFilter(obj, event);
}
void TextBrowserHelpWidget::wheelEvent(QWheelEvent *e)
{
if (e->modifiers() == Qt::ControlModifier) {
e->accept();
e->delta() > 0 ? scaleUp() : scaleDown();
} else {
QTextBrowser::wheelEvent(e);
}
}
void TextBrowserHelpWidget::mousePressEvent(QMouseEvent *e)
{
if (Utils::HostOsInfo::isLinuxHost() && m_parent->handleForwardBackwardMouseButtons(e))