Add "Zoom" setting to the Help font settings

If the scrollWheelZooming is enabled, this
setting will get updated when using scroll wheel.
It will also be used when zooming in/out
by using keyboard shortcuts.

Fixes: QTCREATORBUG-25109
Fixes: QTCREATORBUG-25230
Fixes: QTCREATORBUG-23731
Change-Id: I9d22632b4c034ce236fa39dba074df4a2746ff84
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Jarek Kobus
2021-01-14 13:21:15 +01:00
parent aa974e6816
commit 291f46386f
20 changed files with 188 additions and 230 deletions

View File

@@ -173,11 +173,6 @@ void WebEngineHelpViewer::setViewerFont(const QFont &font)
webSettings->setFontSize(QWebEngineSettings::DefaultFontSize, font.pointSize());
}
qreal WebEngineHelpViewer::scale() const
{
return m_widget->zoomFactor();
}
void WebEngineHelpViewer::setScale(qreal scale)
{
m_widget->setZoomFactor(scale);
@@ -277,21 +272,6 @@ WebEngineHelpPage *WebEngineHelpViewer::page() const
return static_cast<WebEngineHelpPage *>(m_widget->page());
}
void WebEngineHelpViewer::scaleUp()
{
m_widget->setZoomFactor(m_widget->zoomFactor() + 0.1);
}
void WebEngineHelpViewer::scaleDown()
{
m_widget->setZoomFactor(qMax(qreal(0.1), m_widget->zoomFactor() - qreal(0.1)));
}
void WebEngineHelpViewer::resetScale()
{
m_widget->setZoomFactor(1.0);
}
void WebEngineHelpViewer::copy()
{
m_widget->triggerPageAction(QWebEnginePage::Copy);