]> gitweb.stoutner.com Git - PrivacyBrowserPC.git/blobdiff - src/widgets/TabWidget.cpp
Hide the find text actions by default. https://redmine.stoutner.com/issues/960
[PrivacyBrowserPC.git] / src / widgets / TabWidget.cpp
index a5ecefc3b96579b75f1e0b5404b7753f2c720322..5b5a08c630cbae3985ef41b42711d6ba88459bef 100644 (file)
@@ -219,6 +219,14 @@ PrivacyWebEngineView* TabWidget::addTab(const bool removeUrlLineEditFocus, const
             emit hideProgressBar();
     });
 
+    // Update the zoom factor when changed by CTRL-Scrolling.  This can be modified when <https://redmine.stoutner.com/issues/845> is fixed.
+    connect(webEnginePagePointer, &QWebEnginePage::contentsSizeChanged, [webEnginePagePointer, this] ()
+    {
+        // Only update the zoom factor action text if this is the current tab.
+        if (webEnginePagePointer == currentWebEnginePagePointer)
+            emit updateZoomFactorAction(webEnginePagePointer->zoomFactor());
+    });
+
     // Display find text results.
     connect(webEnginePagePointer, SIGNAL(findTextFinished(const QWebEngineFindTextResult &)), this, SLOT(findTextFinished(const QWebEngineFindTextResult &)));