Add on-the-fly zoom factor.
[PrivacyBrowserPC.git] / src / MainView.cpp
index 99c9355053652253527d727961ba751041dbb898..04cc1ee87d86082db817e3023d110000904e52e7 100644 (file)
@@ -156,12 +156,13 @@ void MainView::applyDomainSettings(bool reloadWebsite) const
     // Apply the user agent.
     webEngineProfilePointer->setHttpUserAgent(UserAgentHelper::getUserAgent(Settings::userAgent()));
 
-    // Emit the user agent updated signal, which causes the on-the-fly menu to be updated.
-    emit userAgentUpdated(Settings::userAgent());
-
     // Set the zoom factor.
     webEngineViewPointer->setZoomFactor(Settings::zoomFactor());
 
+    // Emit the on-the-fly menu update signals.
+    emit userAgentUpdated(Settings::userAgent());
+    emit zoomFactorUpdated(Settings::zoomFactor());
+
     // Reload the website if requested.
     if (reloadWebsite)
     {
@@ -196,6 +197,12 @@ void MainView::applyOnTheFlyUserAgent(QAction *userAgentActionPointer) const
     webEngineViewPointer->reload();
 }
 
+void MainView::applyOnTheFlyZoomFactor(const double &zoomFactor) const
+{
+    // Set the zoom factor.
+    webEngineViewPointer->setZoomFactor(zoomFactor);
+}
+
 void MainView::goHome() const
 {
     // Load the homepage.