feat: show zoom percentage in statusbar resolving #2870

This commit is contained in:
Skeptic Spriggan 2025-11-07 10:25:28 +01:00
parent e5fb34d540
commit 9567a75bfb
1 changed files with 5 additions and 7 deletions

View File

@ -731,14 +731,12 @@ class WebEngineZoom(browsertab.AbstractZoom):
def connect_signals(self):
"""Called from WebEngineTab.connect_signals."""
page = self._widget.page()
try:
if machinery.IS_QT5:
page.zoomFactorChanged.connect(self.factor_changed) # type: ignore[attr-defined]
else:
if machinery.IS_QT6:
try:
page.zoomFactorChanged.connect(self.factor_changed)
except AttributeError:
# Added in Qt 6.8
pass
except AttributeError:
# Added in Qt 6.8
pass
def _set_factor_internal(self, factor):
self._widget.setZoomFactor(factor)