1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 01:22:10 +01:00

Workaround Qt5.8 zoom factor bug

Signed-off-by: Anthony Fieroni <bvbfan@abv.bg>
This commit is contained in:
Anthony Fieroni 2017-05-08 14:37:07 +03:00 committed by David Rosca
parent 54949f94f3
commit db33b8d860

View File

@ -40,6 +40,7 @@
#include <QDir>
#include <QTimer>
#include <QVersionNumber>
#include <QDesktopServices>
#include <QWebEngineHistory>
#include <QClipboard>
@ -154,6 +155,15 @@ void WebView::setPage(WebPage *page)
// Set default zoom level
zoomReset();
static const bool zoomBug = QVersionNumber::fromString(qVersion()) < QVersionNumber(5, 9, 0);
if (zoomBug) {
connect(m_page, &WebPage::loadProgress, this, [this](int progress) {
if (progress > 0) {
applyZoom();
}
});
}
// Actions needs to be initialized for every QWebEnginePage change
initializeActions();