}
});
- // Update the zoom actions when changed by CTRL-Scrolling. This can be modified when <https://redmine.stoutner.com/issues/845> is fixed.
- connect(webEnginePagePointer, &QWebEnginePage::contentsSizeChanged, [webEnginePagePointer, this] ()
+ // Update the zoom actions when they are changed.
+ connect(webEnginePagePointer, &QWebEnginePage::zoomFactorChanged, [webEnginePagePointer, this] (const qreal newZoomFactor)
{
// Only update the zoom actions if this is the current tab.
if (webEnginePagePointer == currentWebEnginePagePointer)
- Q_EMIT updateZoomActions(webEnginePagePointer->zoomFactor());
+ Q_EMIT updateZoomActions(newZoomFactor);
});
// Display find text results.
/* SPDX-License-Identifier: GPL-3.0-or-later
- * SPDX-FileCopyrightText: 2022-2024 Soren Stoutner <soren@stoutner.com>
+ * SPDX-FileCopyrightText: 2022-2025 Soren Stoutner <soren@stoutner.com>
*
* This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc/>.
*
// Set the new zoom factor.
tabWidgetPointer->applyOnTheFlyZoomFactor(currentZoomFactorDouble);
-
- // Update the on-the-fly action text.
- updateZoomActions(currentZoomFactorDouble);
}
void BrowserWindow::editBookmarks()
{
// Set the new zoom factor.
tabWidgetPointer->applyOnTheFlyZoomFactor(newZoomFactorDouble);
-
- // Update the on-the-fly action text.
- updateZoomActions(newZoomFactorDouble);
}
}
// Set the new zoom factor.
tabWidgetPointer->applyOnTheFlyZoomFactor(currentZoomFactorDouble);
-
- // Update the on-the-fly action text.
- updateZoomActions(currentZoomFactorDouble);
}
void BrowserWindow::loadUrlFromLineEdit(const QString &url) const
{
// Set the new zoom factor.
tabWidgetPointer->applyOnTheFlyZoomFactor(defaultZoomFactorDouble);
-
- // Update the on-the-fly action text.
- updateZoomActions(defaultZoomFactorDouble);
}