diff options
author | 2021-05-12 19:04:43 +0530 | |
---|---|---|
committer | 2021-05-12 19:04:43 +0530 | |
commit | 2abe5e01d1bc786cf177b0db2645818f57d4f540 (patch) | |
tree | 205b5d8f022ed3ec4a2efc4dbf631548125ada23 /src/mainwindow.cpp | |
parent | c13e84957e0aefd96b57f98ca1128c93901f587d (diff) | |
download | whatsie-2abe5e01d1bc786cf177b0db2645818f57d4f540.tar.gz whatsie-2abe5e01d1bc786cf177b0db2645818f57d4f540.zip |
implemented page zoom feature,
- in settings widget.
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r-- | src/mainwindow.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
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) |