From 2abe5e01d1bc786cf177b0db2645818f57d4f540 Mon Sep 17 00:00:00 2001 From: keshavbhatt Date: Wed, 12 May 2021 19:04:43 +0530 Subject: implemented page zoom feature, - in settings widget. --- src/mainwindow.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index cdeab28..a2a7770 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -203,6 +203,12 @@ void MainWindow::init_settingWidget() } }); + connect(settingsWidget,&SettingsWidget::zoomChanged,[=]() + { + double currentFactor = settings.value("zoomFactor",1.0).toDouble(); + webEngine->page()->setZoomFactor(currentFactor); + }); + connect(settingsWidget,&SettingsWidget::notificationPopupTimeOutChanged,[=](){ setNotificationPresenter(this->webEngine->page()->profile()); }); @@ -593,6 +599,9 @@ void MainWindow::createWebPage(bool offTheRecord) connect(webEngine->page(), SIGNAL(fullScreenRequested(QWebEngineFullScreenRequest)), this, SLOT(fullScreenRequested(QWebEngineFullScreenRequest))); + + double currentFactor = settings.value("zoomFactor",1.0).toDouble(); + webEngine->page()->setZoomFactor(currentFactor); } void MainWindow::setNotificationPresenter(QWebEngineProfile* profile) -- cgit v1.2.3